Show / Hide Table of Contents

Class Factory

A factory helper class for creating instances using a constructor without arguments.

Inheritance
System.Object
Factory
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: SpiceSharp.Reflection
Assembly: SpiceSharp.dll
Syntax
public static class Factory

Methods

Get(Type)

Creates an instance of the specified type.

Declaration
public static object Get(Type type)
Parameters
Type Name Description
System.Type type

The type.

Returns
Type Description
System.Object

The instance of the specified type.

Get<T>()

Creates an instance.

Declaration
public static T Get<T>()
Returns
Type Description
T

The instance of the specified type.

Type Parameters
Name Description
T

The type.

Back to top Generated by DocFX