C# Class Remotion.Development.UnitTesting.PrivateInvoke

Provides utility functions for accessing non-public types and members.
Show file Open project: re-motion/Relinq-SqlBackend Class Usage Examples

Public Methods

Method Description
CreateInstanceNonPublicCtor ( Assembly assembly, string typeName ) : object
CreateInstanceNonPublicCtor ( Type type ) : object
CreateInstanceNonPublicCtor ( string assemblyString, string typeName ) : object
CreateInstancePublicCtor ( Assembly assembly, string typeName ) : object
CreateInstancePublicCtor ( Type type ) : object
CreateInstancePublicCtor ( string assemblyString, string typeName ) : object
GetNonPublicField ( object target, Type declaringType, string fieldName ) : object
GetNonPublicField ( object target, string fieldName ) : object
GetNonPublicProperty ( object target, Type declaringType, string propertyName ) : object
GetNonPublicProperty ( object target, string propertyName ) : object
GetNonPublicStaticField ( Type type, string fieldName ) : object
GetNonPublicStaticProperty ( Type type, string propertyName ) : object
GetPublicField ( object target, string fieldName ) : object
GetPublicProperty ( object target, string propertyName ) : object
GetPublicStaticField ( Type type, string fieldName ) : object
GetPublicStaticProperty ( Type type, string propertyName ) : object
InvokeNonPublicMethod ( object target, Type definingType, string methodName ) : object
InvokeNonPublicMethod ( object target, string methodName ) : object
InvokeNonPublicStaticMethod ( Type type, string methodName ) : object
InvokePublicMethod ( object target, string methodName ) : object
InvokePublicStaticMethod ( Type type, string methodName ) : object
SetNonPublicField ( object target, string fieldName, object value ) : void
SetNonPublicProperty ( object target, Type declaringType, string propertyName, object value ) : void
SetNonPublicProperty ( object target, string propertyName, object value ) : void
SetNonPublicStaticField ( Type type, string fieldName, object value ) : void
SetNonPublicStaticProperty ( Type type, string propertyName, object value ) : void
SetPublicField ( object target, string fieldName, object value ) : void
SetPublicProperty ( object target, string propertyName, object value ) : void
SetPublicStaticField ( Type type, string fieldName, object value ) : void
SetPublicStaticProperty ( Type type, string propertyName, object value ) : void

Private Methods

Method Description
CreateInstanceInternal ( Type type, bool isPublic, object arguments ) : object
GetConstructor ( Type type, BindingFlags bindingFlags, object arguments ) : ConstructorInfo
GetFieldInternal ( object instance, Type type, BindingFlags bindingFlags, string fieldName ) : object
GetFieldRecursive ( Type type, BindingFlags bindingFlags, string fieldName ) : FieldInfo
GetMethod ( Type type, string methodName, BindingFlags bindingFlags, object arguments ) : MethodInfo
GetMethodBaseInternal ( Type type, string methodName, MethodBase methods, object arguments ) : MethodBase
GetPropertyInternal ( object instance, Type type, BindingFlags bindingFlags, string propertyName ) : object
GetPropertyRecursive ( Type type, BindingFlags bindingFlags, string propertyName ) : PropertyInfo
InvokeMethodInternal ( object instance, Type type, BindingFlags bindingFlags, string methodName, object arguments ) : object
SetFieldInternal ( object instance, Type type, BindingFlags bindingFlags, string fieldName, object value ) : void
SetPropertyInternal ( object instance, Type type, BindingFlags bindingFlags, string propertyName, object value ) : void

Method Details

CreateInstanceNonPublicCtor() public static method

public static CreateInstanceNonPublicCtor ( Assembly assembly, string typeName ) : object
assembly System.Reflection.Assembly
typeName string
return object

CreateInstanceNonPublicCtor() public static method

public static CreateInstanceNonPublicCtor ( Type type ) : object
type System.Type
return object

CreateInstanceNonPublicCtor() public static method

public static CreateInstanceNonPublicCtor ( string assemblyString, string typeName ) : object
assemblyString string
typeName string
return object

CreateInstancePublicCtor() public static method

public static CreateInstancePublicCtor ( Assembly assembly, string typeName ) : object
assembly System.Reflection.Assembly
typeName string
return object

CreateInstancePublicCtor() public static method

public static CreateInstancePublicCtor ( Type type ) : object
type System.Type
return object

CreateInstancePublicCtor() public static method

public static CreateInstancePublicCtor ( string assemblyString, string typeName ) : object
assemblyString string
typeName string
return object

GetNonPublicField() public static method

public static GetNonPublicField ( object target, Type declaringType, string fieldName ) : object
target object
declaringType System.Type
fieldName string
return object

GetNonPublicField() public static method

public static GetNonPublicField ( object target, string fieldName ) : object
target object
fieldName string
return object

GetNonPublicProperty() public static method

public static GetNonPublicProperty ( object target, Type declaringType, string propertyName ) : object
target object
declaringType System.Type
propertyName string
return object

GetNonPublicProperty() public static method

public static GetNonPublicProperty ( object target, string propertyName ) : object
target object
propertyName string
return object

GetNonPublicStaticField() public static method

public static GetNonPublicStaticField ( Type type, string fieldName ) : object
type System.Type
fieldName string
return object

GetNonPublicStaticProperty() public static method

public static GetNonPublicStaticProperty ( Type type, string propertyName ) : object
type System.Type
propertyName string
return object

GetPublicField() public static method

public static GetPublicField ( object target, string fieldName ) : object
target object
fieldName string
return object

GetPublicProperty() public static method

public static GetPublicProperty ( object target, string propertyName ) : object
target object
propertyName string
return object

GetPublicStaticField() public static method

public static GetPublicStaticField ( Type type, string fieldName ) : object
type System.Type
fieldName string
return object

GetPublicStaticProperty() public static method

public static GetPublicStaticProperty ( Type type, string propertyName ) : object
type System.Type
propertyName string
return object

InvokeNonPublicMethod() public static method

public static InvokeNonPublicMethod ( object target, Type definingType, string methodName ) : object
target object
definingType System.Type
methodName string
return object

InvokeNonPublicMethod() public static method

public static InvokeNonPublicMethod ( object target, string methodName ) : object
target object
methodName string
return object

InvokeNonPublicStaticMethod() public static method

public static InvokeNonPublicStaticMethod ( Type type, string methodName ) : object
type System.Type
methodName string
return object

InvokePublicMethod() public static method

public static InvokePublicMethod ( object target, string methodName ) : object
target object
methodName string
return object

InvokePublicStaticMethod() public static method

public static InvokePublicStaticMethod ( Type type, string methodName ) : object
type System.Type
methodName string
return object

SetNonPublicField() public static method

public static SetNonPublicField ( object target, string fieldName, object value ) : void
target object
fieldName string
value object
return void

SetNonPublicProperty() public static method

public static SetNonPublicProperty ( object target, Type declaringType, string propertyName, object value ) : void
target object
declaringType System.Type
propertyName string
value object
return void

SetNonPublicProperty() public static method

public static SetNonPublicProperty ( object target, string propertyName, object value ) : void
target object
propertyName string
value object
return void

SetNonPublicStaticField() public static method

public static SetNonPublicStaticField ( Type type, string fieldName, object value ) : void
type System.Type
fieldName string
value object
return void

SetNonPublicStaticProperty() public static method

public static SetNonPublicStaticProperty ( Type type, string propertyName, object value ) : void
type System.Type
propertyName string
value object
return void

SetPublicField() public static method

public static SetPublicField ( object target, string fieldName, object value ) : void
target object
fieldName string
value object
return void

SetPublicProperty() public static method

public static SetPublicProperty ( object target, string propertyName, object value ) : void
target object
propertyName string
value object
return void

SetPublicStaticField() public static method

public static SetPublicStaticField ( Type type, string fieldName, object value ) : void
type System.Type
fieldName string
value object
return void

SetPublicStaticProperty() public static method

public static SetPublicStaticProperty ( Type type, string propertyName, object value ) : void
type System.Type
propertyName string
value object
return void