C# Класс PRI.ProductivityExtensions.ReflectionExtensions.Typeable

Показать файл Открыть проект

Открытые методы

Метод Описание
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