Table of Contents

Class BaseSingleInstancesFactory

Namespace
Dynamitey.DynamicObjects
Assembly
Dynamitey.Community.dll

Base Class for making a singleton fluent factory using an Impromptu Interface return type.

public class BaseSingleInstancesFactory : BaseFactory, IDynamicMetaObjectProvider, IEquivalentType
Inheritance
BaseSingleInstancesFactory
Implements
Inherited Members

Constructors

BaseSingleInstancesFactory()

Initializes a new instance of the BaseSingleInstancesFactory class.

[RequiresDynamicCode("Constructing any BaseObject-derived type instantiates System.Dynamic.DynamicObject, whose default constructor requires the DLR's runtime code generation; not supported when AOT-compiled.")]
public BaseSingleInstancesFactory()

Fields

_hashFactoryTypes

Store Singletons

protected readonly Dictionary<string, dynamic> _hashFactoryTypes

Field Value

Dictionary<string, dynamic>

_lockTable

Lock for accessing singletons

protected readonly object _lockTable

Field Value

object

Methods

GetInstanceForDynamicMember(string, params object?[])

Gets the instance for a dynamic member. Override for type construction behavior changes based on property name.

[RequiresUnreferencedCode("Calls TryTypeForName (reflects over EquivalentType's members by name) and the annotated CreateType.")]
[RequiresDynamicCode("CreateType requires the DLR's runtime code generation; not supported when AOT-compiled.")]
protected override object? GetInstanceForDynamicMember(string memberName, params object?[] args)

Parameters

memberName string

Name of the member.

args object[]

Returns

object