Search Results for

    Show / Hide Table of Contents

    Class ObjectFactory

    Helper class for dynamically creating objects.

    Inheritance
    object
    ObjectFactory
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Sdl.Core.PluginFramework
    Assembly: Sdl.Core.PluginFramework.dll
    Syntax
    public class ObjectFactory

    Constructors

    ObjectFactory()

    Declaration
    public ObjectFactory()

    Methods

    CreateObject<T>(string)

    Creates an oject of the specified type.

    Declaration
    public static T CreateObject<T>(string typeName) where T : class
    Parameters
    Type Name Description
    string typeName

    The name of the type to instantiate.

    Returns
    Type Description
    T

    The newly created object.

    Type Parameters
    Name Description
    T

    The requested object type.

    Exceptions
    Type Condition
    InvalidCastException

    When the newly created object is not of the requested type T.

    In this article
    • Constructors
      • ObjectFactory()
    • Methods
      • CreateObject<T>(string)
    Back to top Generated by DocFX