public void Main()
    {
        var foo  = new Foo();
        var foo2 = foo.Baz();

        Assert.IsInstanceOfType(foo.GetType(), foo2);
    }
Beispiel #2
0
            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"));
            }
 static Bar()
 {
     Foo.Baz();
     Console.Write("2");
 }