C# 클래스 PRI.ProductivityExtensions.ReflectionExtensions.Typeable

파일 보기 프로젝트 열기: peteraritchie/ProductivityExtensions

공개 메소드들

메소드 설명
GetDefaultValue ( this typeToCreateValueFor, bool safeDefaults ) : object

Gets the default value for the type, e.g. 0 for int, empty guid for guid.

GetFullTypeName ( this type ) : string

Gets the full type name, of the format: Type.Fullname, assembly name. If the assembly is signed, the full assembly name is added, otherwise just the assembly name, not the version, public key token or culture.

Use this method if you need to store the type's full name in a string for re-instantiation later on with Activator.CreateInstance.

IsNetSystemType ( this type ) : bool

Determines whether the type specified is a system type of .NET. System types are types in mscorlib, assemblies which start with 'Microsoft.', 'System.' or the System assembly itself.

IsNullableValueType ( this toCheck ) : bool

Determines whether the type this method is called on is a nullable type of type Nullable(Of T)

메소드 상세

GetDefaultValue() 공개 정적인 메소드

Gets the default value for the type, e.g. 0 for int, empty guid for guid.
public static GetDefaultValue ( this typeToCreateValueFor, bool safeDefaults ) : object
typeToCreateValueFor this The type to create value for.
safeDefaults bool if set to true, the routine will return string.Empty for string and empty byte array for byte[], otherwise null
리턴 object

GetFullTypeName() 공개 정적인 메소드

Gets the full type name, of the format: Type.Fullname, assembly name. If the assembly is signed, the full assembly name is added, otherwise just the assembly name, not the version, public key token or culture.
Use this method if you need to store the type's full name in a string for re-instantiation later on with Activator.CreateInstance.
public static GetFullTypeName ( this type ) : string
type this The type of which the full name should be obtained.
리턴 string

IsNetSystemType() 공개 정적인 메소드

Determines whether the type specified is a system type of .NET. System types are types in mscorlib, assemblies which start with 'Microsoft.', 'System.' or the System assembly itself.
public static IsNetSystemType ( this type ) : bool
type this The type.
리턴 bool

IsNullableValueType() 공개 정적인 메소드

Determines whether the type this method is called on is a nullable type of type Nullable(Of T)
public static IsNullableValueType ( this toCheck ) : bool
toCheck this The type to check.
리턴 bool