C# Class Felinesoft.UmbracoCodeFirst.Core.Modules.DataTypeRegister

Allows the registration and retrieval of data type definitions. Used internally when a data type is processed via an attribute, and can be used by consuming code to register data types which cannot be decorated with an attribute. For example one could register a DataTypeRegistration for an enum from the .NET Framework, for a complex type from a library or indeed for any type whose source code is not controlled by the caller. A registration made explicitly via a call to Register will always take precedence over values specified in a [DataType] attribute. If a data type is used for a property which specifies its own alias, data type name or converter in its property attribute then these settings take precedence over both the registration and the data type attribute.
Mostrar archivo Open project: DanMannMann/UmbracoCodeFirst Class Usage Examples

Public Methods

Method Description
DataTypeRegister ( DataTypeRegisterController &controller, IDataTypeService service ) : System
GetTypesByDataTypeDefinitionIds ( IEnumerable dataTypes ) : List

Gets all types with a data type definition id which appears in the given collection

IsRegistered ( PropertyInfo instance ) : bool

Returns true if the property instance is registered or if the property's type is a registered data type

IsRegistered ( Type dataType ) : bool

Returns true if the specified type is registered

IsRegisteredInstance ( PropertyInfo info ) : bool

Returns true if the specific property instance is registered. False otherwise, even if the property's type is a registered data type

TryGetRegistration ( PropertyInfo instance, DataTypeRegistration &registration ) : bool

Gets the registration for the specified type

TryGetRegistration ( Type dataType, DataTypeRegistration &registration ) : bool

Gets the registration for the specified property instance

Method Details

DataTypeRegister() public method

public DataTypeRegister ( DataTypeRegisterController &controller, IDataTypeService service ) : System
controller DataTypeRegisterController
service IDataTypeService
return System

GetTypesByDataTypeDefinitionIds() public method

Gets all types with a data type definition id which appears in the given collection
Thrown if the type is not registered
public GetTypesByDataTypeDefinitionIds ( IEnumerable dataTypes ) : List
dataTypes IEnumerable
return List

IsRegistered() public method

Returns true if the property instance is registered or if the property's type is a registered data type
public IsRegistered ( PropertyInfo instance ) : bool
instance System.Reflection.PropertyInfo
return bool

IsRegistered() public method

Returns true if the specified type is registered
public IsRegistered ( Type dataType ) : bool
dataType System.Type
return bool

IsRegisteredInstance() public method

Returns true if the specific property instance is registered. False otherwise, even if the property's type is a registered data type
public IsRegisteredInstance ( PropertyInfo info ) : bool
info System.Reflection.PropertyInfo
return bool

TryGetRegistration() public method

Gets the registration for the specified type
Thrown if the type is not registered
public TryGetRegistration ( PropertyInfo instance, DataTypeRegistration &registration ) : bool
instance System.Reflection.PropertyInfo
registration DataTypeRegistration
return bool

TryGetRegistration() public method

Gets the registration for the specified property instance
Thrown if the property instance is not registered
public TryGetRegistration ( Type dataType, DataTypeRegistration &registration ) : bool
dataType System.Type
registration DataTypeRegistration
return bool