Exemplo n.º 1
0
        private SubstitutionContext()
        {
            ThreadContext = new ThreadLocalContext();
            var callSpecificationFactory = CallSpecificationFactoryFactoryYesThatsRight.CreateCallSpecFactory();

            _callRouterResolver = new CallRouterResolver();

            var sequenceNumberGenerator = new SequenceNumberGenerator();

#pragma warning disable 618 // Obsolete
            SequenceNumberGenerator = sequenceNumberGenerator;
#pragma warning restore 618 // Obsolete

            RouteFactory = new RouteFactory(sequenceNumberGenerator, ThreadContext, callSpecificationFactory);

            var callInfoFactory           = new CallInfoFactory();
            var autoValueProvidersFactory = new AutoValueProvidersFactory();
            var substituteStateFactory    = new SubstituteStateFactory(callSpecificationFactory, callInfoFactory, autoValueProvidersFactory);
            var callRouterFactory         = new CallRouterFactory(ThreadContext, RouteFactory);
            var argSpecificationQueue     = new ArgumentSpecificationDequeue(ThreadContext.DequeueAllArgumentSpecifications);
            var dynamicProxyFactory       = new CastleDynamicProxyFactory(argSpecificationQueue);
            var delegateFactory           = new DelegateProxyFactory(dynamicProxyFactory);
            var proxyFactory = new ProxyFactory(delegateFactory, dynamicProxyFactory);
            SubstituteFactory = new SubstituteFactory(substituteStateFactory, callRouterFactory, proxyFactory);
        }
 SubstitutionContext()
 {
     var callRouterFactory = new CallRouterFactory();
     var dynamicProxyFactory = new CastleDynamicProxyFactory();
     var delegateFactory = new DelegateProxyFactory();
     var proxyFactory = new ProxyFactory(delegateFactory, dynamicProxyFactory);
     var callRouteResolver = new CallRouterResolver();
     _substituteFactory = new SubstituteFactory(this, callRouterFactory, proxyFactory, callRouteResolver);
 }
Exemplo n.º 3
0
        SubstitutionContext()
        {
            var callRouterFactory   = new CallRouterFactory();
            var dynamicProxyFactory = new CastleDynamicProxyFactory();
            var delegateFactory     = new DelegateProxyFactory();
            var proxyFactory        = new ProxyFactory(delegateFactory, dynamicProxyFactory);
            var callRouteResolver   = new CallRouterResolver();

            _substituteFactory = new SubstituteFactory(this, callRouterFactory, proxyFactory, callRouteResolver);
        }
Exemplo n.º 4
0
        SubstitutionContext()
        {
            var callRouterFactory     = new CallRouterFactory();
            var argSpecificationQueue = new ArgumentSpecificationDequeue(DequeueAllArgumentSpecifications);
            var dynamicProxyFactory   = new CastleDynamicProxyFactory(argSpecificationQueue);
            var delegateFactory       = new DelegateProxyFactory(argSpecificationQueue);
            var proxyFactory          = new ProxyFactory(delegateFactory, dynamicProxyFactory);
            var callRouteResolver     = new CallRouterResolver();

            _substituteFactory = new SubstituteFactory(this, callRouterFactory, proxyFactory, callRouteResolver);
        }
Exemplo n.º 5
0
 SubstitutionContext()
 {
     var callRouterFactory = new CallRouterFactory();
     var interceptorFactory = new CastleInterceptorFactory();
     var dynamicProxyFactory = new CastleDynamicProxyFactory(interceptorFactory);
     var delegateFactory = new DelegateProxyFactory();
     var proxyFactory = new ProxyFactory(delegateFactory, dynamicProxyFactory);
     var callRouteResolver = new CallRouterResolver();
     _substituteFactory = new SubstituteFactory(this, callRouterFactory, proxyFactory, callRouteResolver);
     _argumentSpecifications = new List<IArgumentSpecification>();
 }