Skip to content

Methods_T_CodeJam_Reflection_ReflectionExtensions

Andrew Koryavchenko edited this page Jul 4, 2017 · 11 revisions

ReflectionExtensions Methods

The ReflectionExtensions type exposes the following members.

Methods

 

Name Description
Public method Static member CreateInstance Creates instance of type with specified parameters.
Public method Static member GetDefaultConstructor Returns default constructor.
Public method Static member GetDelegateParams Returns delegate parameter infos.
Public method Static member GetItemType Gets a value indicating whether the current Type encompasses or refers to another type; that is, whether the provided Type is an array, a pointer, or is passed by reference.
Public method Static member GetMemberType Gets the type of this member.
Public method Static member GetMetadataAttributes(TAttribute)(ICustomAttributeProvider) Performs search for metadata attributes. The search is performed in the following order: * member attributes, base implementation attributes (if the attributeProvider is member of the type) * type attributes, base type attributes (if the attributeProvider is type or member of the type) * container type attributes (if the type is nested type) * assembly attributes.
Public method Static member GetMetadataAttributes(TAttribute)(ICustomAttributeProvider, Boolean) Performs search for metadata attributes. If the thisLevelOnly is true, the search is performed in the following order: * member attributes, base implementation attributes (if the attributeProvider is member of the type) * type attributes, base type attributes (if the attributeProvider is type or member of the type) * container type attributes (if the type is nested type) * assembly attributes.
Public method Static member GetModulePath Returns path to the module file.
Public method Static member Code example GetShortAssemblyQualifiedName Gets the short form of assembly qualified type name (without assembly version or assembly key).
Public method Static member IsAnonymous Checks if type is an anonymous type.
Public method Static member IsInstantiable Gets a value indicating whether the type can be instantiated.
Public method Static member IsInteger Checks if type is integer type.
Public method Static member IsNullable Gets a value indicating whether the type is Nullable<> type.
Public method Static member IsNullableEnum Checks if type is nullable enum type.
Public method Static member IsNullableInteger Checks if type is nullable integer type.
Public method Static member IsNullableNumeric Checks if type is nullable numeric type.
Public method Static member IsNumeric Checks if type is numeric type.
Public method Static member IsStatic Gets a value indicating whether the type is declared static.
Public method Static member IsSubClass Determines whether the type derives from the specified check.
Public method Static member ToEnumUnderlying Returns the underlying type argument of the specified enum type.
Public method Static member ToNullableUnderlying Returns the underlying type argument of the specified nullable type.
Public method Static member ToUnderlying Returns the underlying type argument of the specified type.
Public method Static member TryGetMetadataAttribute(TAttribute)(ICustomAttributeProvider) Performs search for metadata attribute. The search is performed in the following order * member attributes, base implementation attributes (if the attributeProvider is member of the type) * type attributes, base type attributes (if the attributeProvider is type or member of the type) * container type attributes (if the type is nested type) * assembly attributes.
Public method Static member TryGetMetadataAttribute(TAttribute)(ICustomAttributeProvider, Boolean) Performs search for metadata attribute. If the thisLevelOnly is true, the search is performed in the following order: * member attributes, base implementation attributes (if the attributeProvider is member of the type) * type attributes, base type attributes (if the attributeProvider is type or member of the type) * container type attributes (if the type is nested type) * assembly attributes.
  Back to Top

See Also

Reference

ReflectionExtensions Class
CodeJam.Reflection Namespace

Clone this wiki locally