예제 #1
0
        public void AddRepeatedInterface()
        {
            ITimeStamped tst = new AnonymousClassTimeStamped(this);
            ProxyFactory pf  = new ProxyFactory(tst);

            // We've already implicitly added this interface.
            // This call should be ignored without error
            pf.AddInterface(typeof(ITimeStamped));
            // All cool
            ITimeStamped ts = (ITimeStamped)pf.GetProxy();
        }
예제 #2
0
 public void AddRepeatedInterface()
 {
     ITimeStamped tst = new AnonymousClassTimeStamped(this);
     ProxyFactory pf = new ProxyFactory(tst);
     // We've already implicitly added this interface.
     // This call should be ignored without error
     pf.AddInterface(typeof(ITimeStamped));
     // All cool
     ITimeStamped ts = (ITimeStamped)pf.GetProxy();
 }