public ProviderInstaller(string providerType, Type providerInterface, Type defaultProvider) { _ComponentLifeStyle = ComponentLifeStyleType.Singleton; _ProviderType = providerType; _ProviderInterface = providerInterface; _defaultProvider = defaultProvider; }
public virtual void RegisterComponent(Type contractType, Type componentType, ComponentLifeStyleType lifestyle) { RegisterComponent(componentType.FullName, contractType, componentType, lifestyle); }
public abstract void RegisterComponent(string name, Type contractType, Type componentType, ComponentLifeStyleType lifestyle);
public virtual void RegisterComponent <TContract, TComponent>(string name, ComponentLifeStyleType lifestyle) where TComponent : class { RegisterComponent(name, typeof(TContract), typeof(TComponent), lifestyle); }
public ProviderInstaller(string providerType, Type providerInterface, ComponentLifeStyleType lifeStyle) { _ComponentLifeStyle = lifeStyle; _ProviderType = providerType; _ProviderInterface = providerInterface; }
public override void RegisterComponent(string name, Type contractType, Type type, ComponentLifeStyleType lifestyle) { AddComponentType(contractType); IComponentBuilder builder = null; switch (lifestyle) { case ComponentLifeStyleType.Transient: builder = new TransientComponentBuilder(name, type); break; case ComponentLifeStyleType.Singleton: builder = new SingletonComponentBuilder(name, type); break; } AddBuilder(contractType, builder); RegisterComponent(name, type); }
/// <summary> /// Initializes a new instance of the <see cref="ProviderInstaller"/> class. /// </summary> /// <param name="providerType"></param> /// <param name="providerInterface"></param> public ProviderInstaller(string providerType, Type providerInterface) { this._ComponentLifeStyle = ComponentLifeStyleType.Singleton; this._ProviderType = providerType; this._ProviderInterface = providerInterface; }
public override void RegisterComponent(string name, System.Type contractType, System.Type componentType, ComponentLifeStyleType lifestyle) { if (!componentTypes.Contains(contractType)) { componentTypes.Add(new ComponentType(contractType)); } IComponentBuilder builder = null; switch (lifestyle) { case ComponentLifeStyleType.Transient: builder = new TransientComponentBuilder(name, componentType); break; case ComponentLifeStyleType.Singleton: builder = new SingletonComponentBuilder(name, componentType); break; } AddBuilder(contractType, builder); registeredComponents[componentType] = name; }
public ProviderInstaller(string providerType, Type providerInterface) { this._ComponentLifeStyle = ComponentLifeStyleType.Singleton; this._ProviderType = providerType; this._ProviderInterface = providerInterface; }