/// <summary> /// Register a component factory. /// </summary> public void RegisterFactory(BuildComponentType type, BuildComponentFactoryDelegate factory) { }
public void RegisterFactory(BuildComponentType type, BuildComponentFactoryDelegate factory) { }
/// <summary> /// Constructor. /// </summary> public BuildComponentEntry(BuildComponentType type, BuildComponentFactoryDelegate factory, CreationPattern pattern) { this.ComponentType = type; _factory = factory; this.Pattern = pattern; }
void IBuildComponentHost.RegisterFactory(BuildComponentType factoryType, BuildComponentFactoryDelegate factory) { _componentFactories.ReplaceFactory(factoryType, factory); }
/// <summary> /// Registers a factory to replace one of the defaults. Creation pattern is inherited from the original. /// </summary> /// <param name="componentType">The type which is created by this factory.</param> /// <param name="factory">The factory to be registered.</param> public void ReplaceFactory(BuildComponentType componentType, BuildComponentFactoryDelegate factory) { BuildComponentEntry existingEntry = _componentEntriesByType[componentType]; _componentEntriesByType[componentType] = new BuildComponentEntry(componentType, factory, existingEntry.Pattern); }
/// <summary> /// Adds a factory. /// </summary> /// <param name="componentType">The type which is created by this factory.</param> /// <param name="factory">Delegate which is responsible for creating the Component.</param> /// <param name="creationPattern">Creation pattern.</param> public void AddFactory(BuildComponentType componentType, BuildComponentFactoryDelegate factory, CreationPattern creationPattern) { _componentEntriesByType[componentType] = new BuildComponentEntry(componentType, factory, creationPattern); }
/// <summary> /// Constructor. /// </summary> public BuildComponentEntry(BuildComponentType type, BuildComponentFactoryDelegate factory, CreationPattern pattern) { ComponentType = type; _factory = factory; Pattern = pattern; }
/// <summary> /// Register a new build component factory with the host. /// </summary> public void RegisterFactory(BuildComponentType type, BuildComponentFactoryDelegate factory) { throw new NotImplementedException(); }
/// <summary> /// Registers a factory with the component host. /// </summary> /// <param name="factoryType">The factory type to register.</param> /// <param name="factory">The factory method.</param> void IBuildComponentHost.RegisterFactory(BuildComponentType factoryType, BuildComponentFactoryDelegate factory) { _componentFactories.ReplaceFactory(factoryType, factory); }
/// <summary> /// Registers a factory which will be used to create the necessary components of the build /// system. /// </summary> /// <param name="componentType">The type which is created by this factory.</param> /// <param name="componentProvider">The factory to be registered.</param> internal void ReplaceRegisterdFactory(BuildComponentType componentType, BuildComponentFactoryDelegate componentProvider) { ((IBuildComponentHost)this.BuildManager).RegisterFactory(componentType, componentProvider); }