C# Класс ReflectionMagic.PrivateReflectionUsingDynamicExtensions

Показать файл Открыть проект

Открытые методы

Метод Описание
AsDynamic ( this o ) : dynamic

Wraps the specified object in a dynamic object that allows access to private members.

Does not wrap null, string, primitive types, and already wrapped objects.

AsDynamicType ( this type ) : dynamic

Wraps the specified type in a dynamic object which allows easy instantion through the PrivateReflectionDynamicObjectStatic.New method.

CreateDynamicInstance ( this assembly, string typeName ) : dynamic

Tries to instantiate the type with the specified type name from the specified assembly instance using the specified constructor arguments.

GetDynamicType ( this assembly, string typeName ) : dynamic

Gets the type with the specified name from the specified assembly instance, and returns it as a dynamic object. See also AsDynamicType.

Описание методов

AsDynamic() публичный статический Метод

Wraps the specified object in a dynamic object that allows access to private members.
Does not wrap null, string, primitive types, and already wrapped objects.
public static AsDynamic ( this o ) : dynamic
o this The object to wrap
Результат dynamic

AsDynamicType() публичный статический Метод

Wraps the specified type in a dynamic object which allows easy instantion through the PrivateReflectionDynamicObjectStatic.New method.
public static AsDynamicType ( this type ) : dynamic
type this The type to wrap.
Результат dynamic

CreateDynamicInstance() публичный статический Метод

Tries to instantiate the type with the specified type name from the specified assembly instance using the specified constructor arguments.
Thrown when no suitable constructor can be found.
public static CreateDynamicInstance ( this assembly, string typeName ) : dynamic
assembly this The assembly instance to search.
typeName string The full type name.
Результат dynamic

GetDynamicType() публичный статический Метод

Gets the type with the specified name from the specified assembly instance, and returns it as a dynamic object. See also AsDynamicType.
public static GetDynamicType ( this assembly, string typeName ) : dynamic
assembly this The assembly instance to search for the type.
typeName string The type name.
Результат dynamic