Show / Hide Table of Contents

Class ComponentFactory

Provides interface for creating components based on their unique typename. To be used with add command.

Inheritance
System.Object
ComponentFactory
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: DiagramModel.Components
Assembly: cs.temp.dll.dll
Syntax
public class ComponentFactory

Methods

CanCreateComponent(String)

Checks whether component with the given typename can be created.

Declaration
public static bool CanCreateComponent(string type)
Parameters
Type Name Description
System.String type

Component's default and unique typename.

Returns
Type Description
System.Boolean

The result of the check.

CreateComponent(String, String, Component)

Creates new component from the provided typename, name and parent component. Doesn't do any validation checks as CanCreateComponent(String) is designed for these.

Declaration
public static Component CreateComponent(string type, string name, Component parent)
Parameters
Type Name Description
System.String type

Component's default and unique typename.

System.String name

Component's name that should be passed in the constructor.

Component parent

Parent component instance.

Returns
Type Description
Component
In This Article
Back to top Generated by DocFX