Otter SDK Reference
Version:

AhReflection Class

A collection of Additional Helper methods to perform reflection related tasks.

Inheritance Hierarchy

  • object
    • Inedo.AhReflection

Syntax

public class AhReflection

Methods

Name Description
GetBaseTypes(System.Type type)

Returns an enumeration of the specified type and all its base types.

GetCustomAttribute<T>(System.Reflection.ICustomAttributeProvider member)

Returns an attribute (typed <typeparamref name="T" />) if it is present on a member.

GetCustomAttributes<T>(System.Reflection.ICustomAttributeProvider member)

Returns all instances of an attribute type if it is present on a member.

GetGenericArgumentsFromAncestor(System.Type type, System.Type genericTypeDefinition)

Returns the generic arguments from an ancestor with the specified generic type definition from the specified type, or an empty type array if the type's ancestors do not implement the specified generic type definition.

GetMethodWithSignature(System.Type type, string methodName, System.Collections.Generic.IEnumerable<System.Type> argTypes)

Returns the first matching method with a signature compatible to the specified argument types.

ImplementsInterface(System.Type toCheck, System.Type iface)

Returns a value indicating whether a type implements an interface.