Class ReflectionUtils
Provides core reflection utility functions used by the majority of projects
Inheritance
System.Object
ReflectionUtils
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Azos
Assembly: Azos.dll
Syntax
public static class ReflectionUtils
Methods
IndexOfArg(MethodInfo, Type, String)
Returns the index of a named typed method argument
Declaration
public static int IndexOfArg(this MethodInfo method, Type type, string name)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | method | |
System.Type | type | |
System.String | name |
Returns
Type | Description |
---|---|
System.Int32 |
IsAsyncMethod(MethodInfo)
Returns true if the supplied method is an async method
Declaration
public static bool IsAsyncMethod(this MethodInfo method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | method |
Returns
Type | Description |
---|---|
System.Boolean |
OfSignature(MethodInfo, Type[])
Returns true when the method has the specified signature
Declaration
public static bool OfSignature(this MethodInfo method, params Type[] args)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | method | |
System.Type[] | args |
Returns
Type | Description |
---|---|
System.Boolean |
ToDescription(MemberInfo)
Returns MemberInfo described as short string
Declaration
public static string ToDescription(this MemberInfo mem)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MemberInfo | mem |
Returns
Type | Description |
---|---|
System.String |