ExtensionsReflection Methods |
The ExtensionsReflection type exposes the following members.
Name | Description | |
---|---|---|
AreReferenceAssignable |
Returns a value that indicates whether the specified type can be assigned to the current type.
| |
CreateInstance(ConstructorInfo, Object) |
Creates an instance of the specified type using the constructor
| |
CreateInstance(Type, Object) |
Creates an instance of the specified type using the constructor that best matches the
specified parameters.
| |
GetChildrenType |
Returns the type of T in an IEnumerableT implementation
| |
GetCustomAttributeTAttib, TEnum |
Gets the attribute of an enum member
| |
GetDefaultInstance |
Retrieves the default value for a given Type.
http://stackoverflow.com/questions/2490244/default-value-of-a-type-at-runtime By Mark Jones
| |
GetDictionaryKeyValueTypes |
Returns the type of TKey and TValue in an IDictionaryTKey, TValue implementation
| |
GetDisplayNameTEnum |
Returns the name value of the DisplayNameAttribute of the enum member
| |
GetFieldsEx |
Returns all the fields of the current Type, using the specified binding constraints
including those of the base classes.
| |
GetMethod |
Returns all the methods of the current Type, using the specified binding constraints
including those of the base classes.
| |
GetMethodEx |
Searches for the specified public method whose parameters match the specified argument types.
| |
GetMethodsEx |
Returns all the methods of the current Type, using the specified binding constraints
including those of the base classes.
| |
GetPropertiesEx |
Returns all the properties of the current Type, using the specified binding constraints
including those of the base classes.
| |
GetPropertyEx |
Gets a specific property of the current Type.
This method will try to find the exact property if an AmbiguousMatchException occures
| |
GetPropertyFromPath |
Tries to find a property defined by a path
| |
GetPropertyNonPublicValueT |
Searches for the specified property, using the specified binding constraints and returns
its value.
Default BindingFlags are Instance and NonPublic | |
GetPropertyValue(Object, String, BindingFlags) |
Searches for the specified property, using the specified binding constraints and returns
its value.
| |
GetPropertyValueT(Object, String) |
Searches for the specified property, using the specified binding constraints and returns
its value.
Default BindingFlags are Instance and Public | |
GetPropertyValueT(Object, String, BindingFlags) |
Searches for the specified property, using the specified binding constraints and returns
its value.
| |
GetValueTEnum |
Returns the enum value from a display name. The enum members requires the DisplayNameAttribute. If non of the enum values has a matching DisplayName, then it will try to use TryParseTEnum(String, TEnum) to retrive a value; otherwise it will
return the default value.
Returns the default value of the enum if value is null
| |
ImplementsInterface(TypeInfo, Type) |
Checks if the type has implemented the defined interface
| |
ImplementsInterface(Type, Type) |
Checks if the type has implemented the defined interface
| |
ImplementsInterfaceT(TypeInfo) |
Checks if the type has implemented the defined interface
| |
ImplementsInterfaceT(Type) |
Checks if the type has implemented the defined interface
| |
IsCollectionOrList |
Checks if the type implements the ICollection or IList interface
| |
IsNullable |
Gets a value indicating whether the current type is a NullableT | |
MatchesArgumentTypes(MethodBase, Type) |
Returns true if the argument types defined by argumentTypes matches
with the argument types of method | |
MatchesArgumentTypes(ParameterInfo, Type) |
Returns true if the argument types defined by argumentTypes matches
with the argument types of parameters |