C# Class Rebel.Tests.CoreAndFramework.AccessPrivateWrapper

A 10 minute wrapper to access private members, havn't tested in detail. Use under your own risk - [email protected]
Inheritance: System.Dynamic.DynamicObject
Exibir arquivo Open project: RebelCMS/rebelcmsxu5

Public Methods

Method Description
AccessPrivateWrapper ( object o ) : System

Create a simple private wrapper

FromType ( Assembly asm, string type ) : dynamic

Create an instance via the constructor matching the args

TryGetMember ( System binder, object &result ) : bool

Tries to get a property or field with the given name

TryInvokeMember ( InvokeMemberBinder binder, object args, object &result ) : bool

Try invoking a method

TrySetMember ( SetMemberBinder binder, object value ) : bool

Tries to set a property or field with the given name

Method Details

AccessPrivateWrapper() public method

Create a simple private wrapper
public AccessPrivateWrapper ( object o ) : System
o object
return System

FromType() public static method

Create an instance via the constructor matching the args
public static FromType ( Assembly asm, string type ) : dynamic
asm System.Reflection.Assembly
type string
return dynamic

TryGetMember() public method

Tries to get a property or field with the given name
public TryGetMember ( System binder, object &result ) : bool
binder System
result object
return bool

TryInvokeMember() public method

Try invoking a method
public TryInvokeMember ( InvokeMemberBinder binder, object args, object &result ) : bool
binder System.Dynamic.InvokeMemberBinder
args object
result object
return bool

TrySetMember() public method

Tries to set a property or field with the given name
public TrySetMember ( SetMemberBinder binder, object value ) : bool
binder System.Dynamic.SetMemberBinder
value object
return bool