Example #1
0
 public PublicClassPublicMethod()
 {
     _duckObjectInterface    = _testObject.DuckAs <ISomeObject>();
     _duckObjectAbstract     = _testObject.DuckAs <AbstractSomeObject>();
     _duckObjectVirtualClass = _testObject.DuckAs <VirtualClassSomeObject>();
     _expressionFetcher      = new DynamicFetcher("Sum")
     {
         FetcherType = FetcherType.ExpressionTree
     };
     _expressionFetcher.Load(_testObject);
     _emitFetcher = new DynamicFetcher("Sum")
     {
         FetcherType = FetcherType.Emit
     };
     _emitFetcher.Load(_testObject);
     _mInfo = typeof(SomeObject).GetMethod("Sum", DuckAttribute.AllFlags);
 }
Example #2
0
 public PublicClassPublicPropertyGetterValue()
 {
     _duckObjectInterface    = _testObject.DuckAs <ISomeObject>();
     _duckObjectAbstract     = _testObject.DuckAs <AbstractSomeObject>();
     _duckObjectVirtualClass = _testObject.DuckAs <VirtualClassSomeObject>();
     _expressionFetcher      = new DynamicFetcher("Value")
     {
         FetcherType = FetcherType.ExpressionTree
     };
     _expressionFetcher.Load(_testObject);
     _emitFetcher = new DynamicFetcher("Value")
     {
         FetcherType = FetcherType.Emit
     };
     _emitFetcher.Load(_testObject);
     _delegateFetcher = new DelegatePropertyFetcher <SomeObject, int>(typeof(SomeObject).GetProperty("Value") !);
     _pInfo           = typeof(SomeObject).GetProperty("Value", DuckAttribute.AllFlags);
 }