Beispiel #1
0
        public void TargetImplementsOneInterfaceThatHasDuplicatedBaseInterfaceWithAdditionalProxiedInterfaces()
        {
            var target = new ImplementedFooExtended();

            var foo =
                (IHasMethod)
                generator.CreateInterfaceProxyWithTarget(typeof(IHasMethod), new[] { typeof(IFooExtended), typeof(IBarFoo) },
                                                         target,
                                                         new ProceedOnTypeInterceptor(typeof(IBarFoo)));

            foo.Foo();
            ((IFooExtended)foo).FooExtended();
            ((IBarFoo)foo).Bar();
        }
		public void TargetImplementsOneInterfaceThatHasDuplicatedBaseInterfaceWithAdditionalProxiedInterfaces()
		{
			var target = new ImplementedFooExtended();

		    var foo =
		        (IHasMethod)
		        generator.CreateInterfaceProxyWithTarget(typeof (IHasMethod), new[] {typeof (IFooExtended), typeof (IBarFoo)},
		                                                 target,
		                                                 new ProceedOnTypeInterceptor(typeof (IBarFoo)));

			foo.Foo();
			((IFooExtended)foo).FooExtended();
			((IBarFoo)foo).Bar();
		}