Example #1
0
        public DecoratorInterceptor(DecoratorExpressionInterceptorData data)
        {
            this.registrationsCache = new Dictionary <InstanceProducer, Registration>();
            this.singletonDecoratedCollectionsCache = new Dictionary <InstanceProducer, IEnumerable>();

            this.data = data;
        }
Example #2
0
 public ServiceDecoratorExpressionInterceptor(DecoratorExpressionInterceptorData data,
                                              Dictionary <InstanceProducer, Registration> registrations, ExpressionBuiltEventArgs e)
     : base(data)
 {
     this.registrations         = registrations;
     this.e                     = e;
     this.registeredServiceType = e.RegisteredServiceType;
 }
 public ContainerUncontrolledServicesDecoratorInterceptor(DecoratorExpressionInterceptorData data,
                                                          Dictionary <InstanceProducer, IEnumerable> singletonDecoratedCollectionsCache,
                                                          ExpressionBuiltEventArgs e, Type registeredServiceType)
     : base(data)
 {
     this.singletonDecoratedCollectionsCache = singletonDecoratedCollectionsCache;
     this.e = e;
     this.registeredServiceType = registeredServiceType;
 }
        public ContainerControlledServicesDecoratorInterceptor(DecoratorExpressionInterceptorData data,
                                                               Dictionary <Type, IDecoratableEnumerable> decoratableEnumerablesCache,
                                                               ExpressionBuiltEventArgs e, Type registeredServiceType, Type decoratorType)
            : base(data)
        {
            this.decoratableEnumerablesCache = decoratableEnumerablesCache;
            this.e = e;
            this.registeredServiceType = registeredServiceType;

            this.decoratorConstructor = data.Container.Options.ConstructorResolutionBehavior
                                        .GetConstructor(this.registeredServiceType, decoratorType);

            // The actual decorator could be different. TODO: must... write... test... for... this.
            this.decoratorType = this.decoratorConstructor.DeclaringType;
        }
Example #5
0
        protected DecoratorExpressionInterceptor(DecoratorExpressionInterceptorData data)
        {
            this.data = data;

            this.Lifestyle = data.Lifestyle;
        }