Axiom.Overlays.OverlayElementManager.AddElementFactory C# (CSharp) Метод

AddElementFactory() публичный Метод

Registers a new OverlayElementFactory with this manager.
Should be used by plugins or other apps wishing to provide a new OverlayElement subclass.
public AddElementFactory ( IOverlayElementFactory factory ) : void
factory IOverlayElementFactory
Результат void
		public void AddElementFactory( IOverlayElementFactory factory )
		{
			_elementFactories.Add( factory.Type, factory );

			LogManager.Instance.Write( "OverlayElementFactory for type '{0}' registered.", factory.Type );
		}

Usage Example

        /// <summary>
        ///     Internal constructor.  This class cannot be instantiated externally.
        /// </summary>
        internal OverlayElementManager()
        {
            if (instance == null) {
                instance = this;

                // register the default overlay element factories
                instance.AddElementFactory(new Elements.BorderPanelFactory());
                instance.AddElementFactory(new Elements.TextAreaFactory());
                instance.AddElementFactory(new Elements.PanelFactory());
            }
        }
All Usage Examples Of Axiom.Overlays.OverlayElementManager::AddElementFactory