Esempio n. 1
0
 public PrivateClassPrivateFieldSetterValue()
 {
     _duckObjectInterface    = _testObject.DuckAs <IPrivateSomeObject>();
     _duckObjectAbstract     = _testObject.DuckAs <AbstractPrivateSomeObject>();
     _duckObjectVirtualClass = _testObject.DuckAs <VirtualClassPrivateSomeObject>();
     _expressionFetcher      = new DynamicFetcher("ValueField")
     {
         FetcherType = FetcherType.ExpressionTree
     };
     _expressionFetcher.Load(_testObject);
     _emitFetcher = new DynamicFetcher("ValueField")
     {
         FetcherType = FetcherType.Emit
     };
     _emitFetcher.Load(_testObject);
     _fInfo = typeof(PrivateSomeObject).GetField("ValueField", DuckAttribute.AllFlags);
 }
Esempio n. 2
0
 public PrivateClassPrivatePropertyGetterObject()
 {
     _duckObjectInterface    = _testObject.DuckAs <IPrivateSomeObject>();
     _duckObjectAbstract     = _testObject.DuckAs <AbstractPrivateSomeObject>();
     _duckObjectVirtualClass = _testObject.DuckAs <VirtualClassPrivateSomeObject>();
     _expressionFetcher      = new DynamicFetcher("Name")
     {
         FetcherType = FetcherType.ExpressionTree
     };
     _expressionFetcher.Load(_testObject);
     _emitFetcher = new DynamicFetcher("Name")
     {
         FetcherType = FetcherType.Emit
     };
     _emitFetcher.Load(_testObject);
     _delegateFetcher = new DelegatePropertyFetcher <PrivateSomeObject, string>(typeof(PrivateSomeObject).GetProperty("Name", DuckAttribute.AllFlags) !);
     _pInfo           = typeof(PrivateSomeObject).GetProperty("Name", DuckAttribute.AllFlags);
 }