public void Deploy(WeldEnvironment environment) { Container.Instance.Initialize(this); environment.AddValue(this, new IQualifier[0], this); environment.AddValue(new ContextualStore(), new IQualifier[0], this); _allMixins = environment.Components.OfType <Mixin>().ToArray(); _allInterceptors = environment.Components.OfType <Interceptor>().ToArray(); _allComponents = new ConcurrentBag <IWeldComponent>(environment.Components.Except(_allMixins).Except(_allInterceptors)); ValidateComponents(); ExecuteConfigurations(environment); _isDeployed = true; }
public void Deploy(WeldEnvironment environment) { environment.AddValue(this, new IAnnotation[0], this); environment.AddValue(new ContextualStore(), new IAnnotation[0], this); var mixins = environment.Components.OfType <Mixin>().ToArray(); var interceptors = environment.Components.OfType <Interceptor>().ToArray(); _registeredComponents.AddRange(environment.Components.Except(mixins).Except(interceptors)); _componentResolver.Invalidate(); AddObservers(environment.Observers); _mixinResolver = new MixinResolver(this, mixins); _interceptorResolver = new InterceptorResolver(this, interceptors); _services.Add(typeof(IExceptionHandlerDispatcher), new ExceptionHandlerDispatcher(this, environment.ExceptionHandlers)); _componentResolver.Validate(); ExecuteConfigurations(environment); }
public void AddValue(object instance, params IBinderAttribute[] binders) { _environment.AddValue(instance, binders, _manager); }
public void AddValue(object instance, params IAnnotation[] annotations) { _environment.AddValue(instance, annotations, _manager); }