MetadataProvider.GetMetadata Method
- Namespace
- Kampute.DocToolkit.Metadata
- Assembly
- Kampute.DocToolkit.dll
| GetMetadata(this Assembly) | Retrieves metadata for an assembly. |
| GetMetadata(this Type) | Retrieves metadata for a type. |
| GetMetadata<T>(this Type) | Retrieves metadata for a type, cast to a specific type. |
| GetMetadata(this ConstructorInfo) | Retrieves metadata for a constructor. |
| GetMetadata(this MethodInfo) | Retrieves metadata for a method. |
| GetMetadata(this PropertyInfo) | Retrieves metadata for a property. |
| GetMetadata(this EventInfo) | Retrieves metadata for the specified event. |
| GetMetadata(this FieldInfo) | Retrieves metadata for a field. |
| GetMetadata(this MemberInfo) | Retrieves metadata for a member. |
GetMetadata(this Assembly)
Retrieves metadata for an assembly.
public static IAssembly GetMetadata(this Assembly assembly)Parameters
assemblyAssembly- The assembly to get metadata for.
Returns
- IAssembly
- An assembly metadata abstraction.
Exceptions
- ArgumentNullException
- Thrown when
assemblyisnull.
GetMetadata(this Type)
Retrieves metadata for a type.
public static IType GetMetadata(this Type type)Parameters
typeType- The type to get metadata for.
Returns
- IType
- A type metadata abstraction.
Exceptions
- ArgumentNullException
- Thrown when
typeisnull.
GetMetadata<T>(this Type)
Retrieves metadata for a type, cast to a specific type.
public static T GetMetadata<T>(this Type type)
where T : class, ITypeType Parameters
T- The specific type of metadata to retrieve.
Parameters
typeType- The type to get metadata for.
Returns
- T
- A type metadata abstraction of the specified type.
Exceptions
- ArgumentNullException
- Thrown when
typeisnull. - InvalidCastException
- Thrown when the retrieved metadata cannot be cast to type
T.
GetMetadata(this ConstructorInfo)
Retrieves metadata for a constructor.
public static IConstructor GetMetadata(this ConstructorInfo constructorInfo)Parameters
constructorInfoConstructorInfo- The constructor to get metadata for.
Returns
- IConstructor
- A constructor metadata abstraction.
Exceptions
- ArgumentNullException
- Thrown when
constructorInfoisnull.
GetMetadata(this MethodInfo)
Retrieves metadata for a method.
public static IMethodBase GetMetadata(this MethodInfo methodInfo)Parameters
methodInfoMethodInfo- The method to get metadata for.
Returns
- IMethodBase
- A method or operator metadata abstraction.
Exceptions
- ArgumentNullException
- Thrown when
methodInfoisnull.
GetMetadata(this PropertyInfo)
Retrieves metadata for a property.
public static IProperty GetMetadata(this PropertyInfo propertyInfo)Parameters
propertyInfoPropertyInfo- The property to get metadata for.
Returns
- IProperty
- A property metadata abstraction.
Exceptions
- ArgumentNullException
- Thrown when
propertyInfoisnull.
GetMetadata(this EventInfo)
Retrieves metadata for the specified event.
public static IEvent GetMetadata(this EventInfo eventInfo)Parameters
eventInfoEventInfo- The event to get metadata for.
Returns
- IEvent
- An event metadata abstraction.
Exceptions
- ArgumentNullException
- Thrown when
eventInfoisnull.
GetMetadata(this FieldInfo)
Retrieves metadata for a field.
public static IField GetMetadata(this FieldInfo fieldInfo)Parameters
fieldInfoFieldInfo- The field to get metadata for.
Returns
- IField
- A field metadata abstraction.
Exceptions
- ArgumentNullException
- Thrown when
fieldInfoisnull.
GetMetadata(this MemberInfo)
Retrieves metadata for a member.
public static IMember GetMetadata(this MemberInfo memberInfo)Parameters
memberInfoMemberInfo- The member to get metadata for.
Returns
- IMember
- A member metadata abstraction.
Exceptions
- ArgumentNullException
- Thrown when
memberInfoisnull. - NotSupportedException
- Thrown the member's type is not supported.
