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

assembly Assembly
The assembly to get metadata for.

Returns

IAssembly
An assembly metadata abstraction.

Exceptions

ArgumentNullException
Thrown when assembly is null.

GetMetadata(this Type)

Retrieves metadata for a type.
public static IType GetMetadata(this Type type)

Parameters

type Type
The type to get metadata for.

Returns

IType
A type metadata abstraction.

Exceptions

ArgumentNullException
Thrown when type is null.

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, IType

Type Parameters

T
The specific type of metadata to retrieve.

Parameters

type Type
The type to get metadata for.

Returns

T
A type metadata abstraction of the specified type.

Exceptions

ArgumentNullException
Thrown when type is null.
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

constructorInfo ConstructorInfo
The constructor to get metadata for.

Returns

IConstructor
A constructor metadata abstraction.

Exceptions

ArgumentNullException
Thrown when constructorInfo is null.

GetMetadata(this MethodInfo)

Retrieves metadata for a method.
public static IMethodBase GetMetadata(this MethodInfo methodInfo)

Parameters

methodInfo MethodInfo
The method to get metadata for.

Returns

IMethodBase
A method or operator metadata abstraction.

Exceptions

ArgumentNullException
Thrown when methodInfo is null.

GetMetadata(this PropertyInfo)

Retrieves metadata for a property.
public static IProperty GetMetadata(this PropertyInfo propertyInfo)

Parameters

propertyInfo PropertyInfo
The property to get metadata for.

Returns

IProperty
A property metadata abstraction.

Exceptions

ArgumentNullException
Thrown when propertyInfo is null.

GetMetadata(this EventInfo)

Retrieves metadata for the specified event.
public static IEvent GetMetadata(this EventInfo eventInfo)

Parameters

eventInfo EventInfo
The event to get metadata for.

Returns

IEvent
An event metadata abstraction.

Exceptions

ArgumentNullException
Thrown when eventInfo is null.

GetMetadata(this FieldInfo)

Retrieves metadata for a field.
public static IField GetMetadata(this FieldInfo fieldInfo)

Parameters

fieldInfo FieldInfo
The field to get metadata for.

Returns

IField
A field metadata abstraction.

Exceptions

ArgumentNullException
Thrown when fieldInfo is null.

GetMetadata(this MemberInfo)

Retrieves metadata for a member.
public static IMember GetMetadata(this MemberInfo memberInfo)

Parameters

memberInfo MemberInfo
The member to get metadata for.

Returns

IMember
A member metadata abstraction.

Exceptions

ArgumentNullException
Thrown when memberInfo is null.
NotSupportedException
Thrown the member's type is not supported.