C# Class Catel.Data.PropertyDataManager

Property data manager.
Show file Open project: Catel/Catel Class Usage Examples

Public Methods

Method Description
GetCatelTypeInfo ( Type type ) : CatelTypeInfo

Gets the property data type information.

GetPropertyData ( Type type, string name ) : PropertyData

Gets the property data.

IsPropertyNameMappedToXmlAttribute ( Type type, string propertyName ) : bool

Determines whether the specified property is mapped to an XML attribute.

IsPropertyNameMappedToXmlElement ( Type type, string propertyName ) : bool

Determines whether the specified property is mapped to an XML element.

IsPropertyRegistered ( Type type, string name ) : bool

Returns whether a specific property is registered.

IsXmlAttributeNameMappedToProperty ( Type type, string xmlName ) : bool

Determines whether the specified XML attribute is mapped to a property name.

IsXmlElementNameMappedToProperty ( Type type, string xmlName ) : bool

Determines whether the specified XML element is mapped to a property name.

MapPropertyNameToXmlAttributeName ( Type type, string propertyName ) : string

Maps the name of the property name to an XML attribute name.

MapPropertyNameToXmlElementName ( Type type, string propertyName ) : string

Maps the name of the property name to an XML element name.

MapXmlAttributeNameToPropertyName ( Type type, string xmlName ) : string

Maps the name of the XML attribute to a property name.

MapXmlElementNameToPropertyName ( Type type, string xmlName ) : string

Maps the name of the XML element to a property name.

RegisterProperties ( Type type ) : CatelTypeInfo

Registers all the properties for the specified type. This method can only be called once per type. The PropertyDataManager caches whether it has already registered the properties once.

RegisterProperty ( Type type, string name, PropertyData propertyData ) : void

Registers a property for a specific type.

UnregisterProperty ( Type type, string name ) : void

Unregisters a property for a specific type.

Private Methods

Method Description
PropertyDataManager ( ) : System

Initializes static members of the PropertyDataManager class.

Method Details

GetCatelTypeInfo() public method

Gets the property data type information.
The is null.
public GetCatelTypeInfo ( Type type ) : CatelTypeInfo
type System.Type The type.
return CatelTypeInfo

GetPropertyData() public method

Gets the property data.
The is null. The is null or whitespace. Thrown when the property is not registered.
public GetPropertyData ( Type type, string name ) : PropertyData
type System.Type The type for which to get the property data.
name string The name of the property.
return PropertyData

IsPropertyNameMappedToXmlAttribute() public method

Determines whether the specified property is mapped to an XML attribute.
The is null. The is null or whitespace.
public IsPropertyNameMappedToXmlAttribute ( Type type, string propertyName ) : bool
type System.Type The type.
propertyName string Name of the property.
return bool

IsPropertyNameMappedToXmlElement() public method

Determines whether the specified property is mapped to an XML element.
The is null. The is null or whitespace.
public IsPropertyNameMappedToXmlElement ( Type type, string propertyName ) : bool
type System.Type The type.
propertyName string Name of the property.
return bool

IsPropertyRegistered() public method

Returns whether a specific property is registered.
The is null. The is null or whitespace.
public IsPropertyRegistered ( Type type, string name ) : bool
type System.Type The type for which to check whether the property is registered.
name string The name of the property.
return bool

IsXmlAttributeNameMappedToProperty() public method

Determines whether the specified XML attribute is mapped to a property name.
The is null. The is null or whitespace.
public IsXmlAttributeNameMappedToProperty ( Type type, string xmlName ) : bool
type System.Type The type.
xmlName string Name of the XML.
return bool

IsXmlElementNameMappedToProperty() public method

Determines whether the specified XML element is mapped to a property name.
The is null. The is null or whitespace.
public IsXmlElementNameMappedToProperty ( Type type, string xmlName ) : bool
type System.Type The type.
xmlName string Name of the XML.
return bool

MapPropertyNameToXmlAttributeName() public method

Maps the name of the property name to an XML attribute name.
public MapPropertyNameToXmlAttributeName ( Type type, string propertyName ) : string
type System.Type The type for which to make the xml name.
propertyName string Name of the property.
return string

MapPropertyNameToXmlElementName() public method

Maps the name of the property name to an XML element name.
public MapPropertyNameToXmlElementName ( Type type, string propertyName ) : string
type System.Type The type for which to make the xml name.
propertyName string Name of the property.
return string

MapXmlAttributeNameToPropertyName() public method

Maps the name of the XML attribute to a property name.
The is null. The is null or whitespace.
public MapXmlAttributeNameToPropertyName ( Type type, string xmlName ) : string
type System.Type The type for which to make the xml name.
xmlName string Name of the XML attribute.
return string

MapXmlElementNameToPropertyName() public method

Maps the name of the XML element to a property name.
The is null. The is null or whitespace.
public MapXmlElementNameToPropertyName ( Type type, string xmlName ) : string
type System.Type The type for which to make the xml name.
xmlName string Name of the XML element.
return string

RegisterProperties() public method

Registers all the properties for the specified type. This method can only be called once per type. The PropertyDataManager caches whether it has already registered the properties once.
The is null. The properties are not declared correctly.
public RegisterProperties ( Type type ) : CatelTypeInfo
type System.Type The type to register the properties for.
return CatelTypeInfo

RegisterProperty() public method

Registers a property for a specific type.
The is null. The is null or whitespace. The is null. A property with the same name is already registered.
public RegisterProperty ( Type type, string name, PropertyData propertyData ) : void
type System.Type The type for which to register the property.
name string The name of the property.
propertyData PropertyData The property data.
return void

UnregisterProperty() public method

Unregisters a property for a specific type.
The is null. The is null or whitespace.
public UnregisterProperty ( Type type, string name ) : void
type System.Type The type for which to register the property.
name string The name of the property.
return void