Click or drag to resize

LifetimeScopeCreateSharedInstance Method (Guid, NullableGuid, FuncObject)

Creates a shared instance with a primary GUID key and possible secondary qualifying GUID key.

Namespace:  Autofac.Core.Lifetime
Assembly:  Autofac (in Autofac.dll) Version: 6.0.0+39696a967e8826f7f1ebc8c1ff4523c9dd75abe0
Syntax
public Object CreateSharedInstance(
	Guid primaryId,
	Nullable<Guid> qualifyingId,
	Func<Object> creator
)

Parameters

primaryId
Type: SystemGuid
Key.
qualifyingId
Type: SystemNullableGuid
Secondary key, to better identify an instance that wraps around another instance or is otherwise "namespaced" by it.
creator
Type: SystemFuncObject
A function that will create the instance when called.

Return Value

Type: Object
The shared instance.

Implements

ISharingLifetimeScopeCreateSharedInstance(Guid, NullableGuid, FuncObject)
See Also