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

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

Creates an element of the specified type, with the specified name
A factory must be available to handle the requested type, or an exception will be thrown.
public CreateElementFromFactory ( string typeName, string instanceName ) : OverlayElement
typeName string
instanceName string
Результат OverlayElement
		public OverlayElement CreateElementFromFactory( string typeName, string instanceName )
		{
			if ( !_elementFactories.ContainsKey( typeName ) )
			{
				throw new AxiomException( "Cannot locate factory for element type '{0}'", typeName );
			}

			// create the element
			return ( (IOverlayElementFactory)_elementFactories[ typeName ] ).Create( instanceName );
		}