C# 클래스 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.
파일 보기 프로젝트 열기: DanMannMann/UmbracoCodeFirst 1 사용 예제들

공개 메소드들

메소드 설명
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

메소드 상세

DataTypeRegister() 공개 메소드

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

GetTypesByDataTypeDefinitionIds() 공개 메소드

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
리턴 List

IsRegistered() 공개 메소드

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
리턴 bool

IsRegistered() 공개 메소드

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

IsRegisteredInstance() 공개 메소드

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
리턴 bool

TryGetRegistration() 공개 메소드

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
리턴 bool

TryGetRegistration() 공개 메소드

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
리턴 bool