DotNext.Reflection by Roman Sakno

<PackageReference Include="DotNext.Reflection" Version="3.2.1" />

.NET API 162,816 bytes

 Type<T>

public static class Type<T>
Provides typed access to class or value type metadata.
public static class Attribute<T, TAttribute> where TAttribute : Attribute

Provides typed access to the type attribute.

public static class Constructor<T>

Provides access to constructor of type T without parameters.

public static class Constructor<T, TParam>

Provides access to constructor of type T with single parameter.

public static class Constructor<T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>

Provides access to constructor of type T with nine parameters.

public static class Constructor<T, T1, T2>

Provides access to constructor of type T with two parameters.

public static class Constructor<T, T1, T2, T3>

Provides access to constructor of type T with three parameters.

public static class Constructor<T, T1, T2, T3, T4>

Provides access to constructor of type T with four parameters.

public static class Constructor<T, T1, T2, T3, T4, T5>

Provides access to constructor of type T with five parameters.

public static class Constructor<T, T1, T2, T3, T4, T5, T6>

Provides access to constructor of type T with six parameters.

public static class Constructor<T, T1, T2, T3, T4, T5, T6, T7>

Provides access to constructor of type T with seven parameters.

public static class Constructor<T, T1, T2, T3, T4, T5, T6, T7, T8>

Provides access to constructor of type T with eight parameters.

public static class Constructor<T, T1, T2, T3, T4, T5, T6, T7, T8, T9>

Provides access to constructor of type T with nine parameters.

public static class Event<T, THandler> where THandler : MulticastDelegate

Provides typed access to instance event declared in type T.

public static class Field<T, TValue>

Provides typed access to instance field declared in type T.

public static class Indexer<T, TIndicies, TValue> where TIndicies : struct

Provides access to indexer property declared in type T.

public static class Method<T>

Provides access to methods declared in type T.

public static class Method<T, TParam>

Provides access to methods with single parameter declared in type T.

public static class Method<T, T1, T2>

Provides access to methods with two parameters declared in type T.

public static class Method<T, T1, T2, T3>

Provides access to methods with three parameters declared in type T.

public static class Method<T, T1, T2, T3, T4>

Provides access to methods with four parameters declared in type T.

public static class Method<T, T1, T2, T3, T4, T5>

Provides access to methods with five parameters declared in type T.

public static class Method<T, T1, T2, T3, T4, T5, T6>

Provides access to methods with six parameters declared in type T.

public static class Operator<T>

Represents unary operator applicable to type T.

public static class Operator<T, TOperand>

Represents binary operator applicable to type T.

public static class Property<T, TValue>

Provides access to property declared in type T.

public static readonly Operator<T, T, bool> Equals

Provides smart equality check.

public static readonly Operator<T, int> GetHashCode

Provides smart hash code computation.

public static T Default { get; }

Returns default value for this type.

public static Type RuntimeType { get; }

Gets reflected type.

public static T Convert<TSource>(TSource value)

Converts object into type T.

public static Constructor<Function<TArgs, T>> GetConstructor<TArgs>(bool nonPublic = false) where TArgs : struct

Reflects constructor as function.

public static Method<Function<T, TArgs, TResult>> GetMethod<TArgs, TResult>(string methodName, bool nonPublic = false) where TArgs : struct

Reflects instance method declared in type T which returns value of type TResult and has arguments described by type TArgs.

public static Method<Procedure<T, TArgs>> GetMethod<TArgs>(string methodName, bool nonPublic = false) where TArgs : struct

Reflects instance method declared in type T without return value and has arguments described by type TArgs.

public static Method<Function<TArgs, TResult>> GetStaticMethod<TArgs, TResult>(string methodName, bool nonPublic = false) where TArgs : struct

Reflects static method declared in type T which returns value of type TResult and has arguments described by type TArgs.

public static Method<Procedure<TArgs>> GetStaticMethod<TArgs>(string methodName, bool nonPublic = false) where TArgs : struct

Reflects static method declared in type T without return value and has arguments described by type TArgs.

public static void Initialize()

Calls static constructor of type T.

public static bool IsAssignableFrom<TOther>()

Determines whether an instance of a specified type can be assigned to an instance of the current type.

public static bool IsAssignableTo<TOther>()

Determines whether an instance of the current type can be assigned to an instance of the specified type.

public static T NewInstance<TArgs>(ref TArgs args, bool nonPublic = false) where TArgs : struct

Creates a new instance of type T.

public static Constructor<Function<TArgs, T>> RequireConstructor<TArgs>(bool nonPublic = false) where TArgs : struct

Reflects constructor as function.

public static Method<Function<T, TArgs, TResult>> RequireMethod<TArgs, TResult>(string methodName, bool nonPublic = false) where TArgs : struct

Reflects instance method declared in type T which returns value of type TResult and has arguments described by type TArgs.

public static Method<Procedure<T, TArgs>> RequireMethod<TArgs>(string methodName, bool nonPublic = false) where TArgs : struct

Reflects instance method declared in type T without return value and has arguments described by type TArgs.

public static Method<Function<TArgs, TResult>> RequireStaticMethod<TArgs, TResult>(string methodName, bool nonPublic = false) where TArgs : struct

Reflects static method declared in type T which returns value of type TResult and has arguments described by type TArgs.

public static Method<Procedure<TArgs>> RequireStaticMethod<TArgs>(string methodName, bool nonPublic = false) where TArgs : struct

Reflects static method declared in type T without return value and has arguments described by type TArgs.

public static Optional<T> TryConvert<TSource>(TSource value)

Applies type cast to the given object respecting overloaded cast operator.

public static bool TryConvert<TSource>(TSource value, out T result)

Applies type cast to the given object respecting overloaded cast operator.