Exemplo n.º 1
0
        IUnityContainer GetContainer()
        {
            callCountHandler = new CallCountHandler();
            returnHandler    = new StringReturnRewriteHandler("REWRITE");

            IUnityContainer container
                = new UnityContainer()
                  .RegisterInstance <ICallHandler>("call count", callCountHandler)
                  .RegisterInstance <ICallHandler>("rewrite", returnHandler);

            return(container);
        }
Exemplo n.º 2
0
        IUnityContainer GetContainer()
        {
            callCountHandler = new CallCountHandler();
            returnHandler = new StringReturnRewriteHandler("REWRITE");

            IUnityContainer container
                = new UnityContainer()
                    .RegisterInstance<ICallHandler>("call count", callCountHandler)
                    .RegisterInstance<ICallHandler>("rewrite", returnHandler);

            return container;
        }