Otter SDK Reference
Version:

GetFactory<T>(bool allowNonPublicConstructor) Method

Returns a factory method that can be used to create an instance of the type <typeparamref name="T" />.

Syntax

public static Func<T> GetFactory<T>(bool allowNonPublicConstructor)

Parameters

allowNonPublicConstructor
Type: bool

Value indicating whether nonpublic constructors should be considered.

Returns

Factory method that can be used to create an instance of the specified type.