public void Test_method_feature_flag_Successful() { IProxyFactory <MethodFeatureFlagTest> proxyFactory = new AttributeProxyFactory <MethodFeatureFlagTest>(); MethodFeatureFlagTest foo = proxyFactory.Create(); // will only call if exposed but you can still call it foo.Foo(); foo.MyMethodLevelFeature_Method(); }
public void Test_Create_Object_Attribute_Successful() { Foo foo1 = ProxyFactory.ProxyFactory <Foo> .CreateFromAttributes <Log4netTraceListener>(); //Foo foo = ProxyFactory.ProxyFactory<Foo>.CreateFromAttributes<Log4netTraceListener>(); IProxyFactory <Foo> proxyFactory = new AttributeProxyFactory <Foo>(); Foo foo2 = proxyFactory.Create <Log4netTraceListener>(); foo2.Bar(3); foo2.Baz(5888, "hello there", 45.44); foo2.FooBaz(5888, "hello there", 45.44, new Temp("ouch")); }
public void Test_class_feature_flag_Successful() { IProxyFactory <ClassFeatureFlagTest> proxyFactory = new AttributeProxyFactory <ClassFeatureFlagTest>(); ClassFeatureFlagTest foo = proxyFactory.Create(); //// will only call if exposed but you can still call it foo.Bar(); foo.Baz(); foo.Foo(); string x = "BEFORE"; x = foo.ToString(); }