public FactoryResolutionPipeline(Foundation foundation, IServiceLocatorAdapter adapter, IServiceLocatorStore store) { var pipeline = new PostResolutionPipeline(foundation, adapter, store); Add(new ConditionalPipelineItem(foundation, adapter, store, pipeline)); Add(new DefaultPipelineItem(foundation, adapter, store, pipeline)); }
public DefaultResolutionPipeline(Foundation foundation, IServiceLocatorAdapter adapter, IServiceLocatorStore store) : base(foundation, adapter, store) { var pipeline = new PostResolutionPipeline(foundation, adapter, store); Add(new AdapterPipelineItem(foundation, adapter, store, pipeline)); }
public ConditionalPipelineItem(Foundation foundation, IServiceLocatorAdapter serviceLocator, IServiceLocatorStore store, PostResolutionPipeline pipeline) : base(foundation, serviceLocator, store) { this.pipeline = pipeline; this.store.Get <IExecutionStore>().WireEvent((ITypeRequester)this); this.store.Get <IExecutionStore>().WireEvent((ITypeResolver)this); this.registrationStore = foundation.StoreFor <ConditionalRegistrationStore>(); }
public override object ResolveWith(IInstanceResolver locator, IServiceLocatorStore context, PostResolutionPipeline pipeline) { if (!tempData.ContainsKey(registration.GetMappedToType().ToString())) { tempData[registration.GetMappedToType().ToString()] = registration.ResolveWith(locator, context, pipeline); } return tempData[registration.GetMappedToType().ToString()]; }
public override object ResolveWith(IInstanceResolver resolver, IServiceLocatorStore context, PostResolutionPipeline pipeline) { if (instance == null) { lock (lockObject) { if(instance == null) { instance = registration.ResolveWith(resolver, context, pipeline); } } } return instance; }
public virtual object ResolveWith(IInstanceResolver locator, IServiceLocatorStore context, PostResolutionPipeline pipeline) { object instance = null; instance = GetActivationStrategy().Resolve(locator, context); if(pipeline != null) { var result = GetResult(instance); pipeline.Execute(result); } return instance; }
public AdapterPipelineItem(Foundation foundation, IServiceLocatorAdapter serviceLocator, IServiceLocatorStore store, PostResolutionPipeline pipeline) : base(foundation, serviceLocator, store) { this.pipeline = pipeline; }
public override object ResolveWith(IInstanceResolver resolver, IServiceLocatorStore context, PostResolutionPipeline pipeline) { return registration.ResolveWith(resolver, context, pipeline); }
public abstract object ResolveWith(IInstanceResolver locator, IServiceLocatorStore context, PostResolutionPipeline pipeline);