ISharingLifetimeScopeCreateSharedInstance Method (Guid, NullableGuid, FuncObject) |
Creates a shared instance with a primary GUID key and
possible secondary qualifying GUID key.
Namespace:
Autofac.Core
Assembly:
Autofac (in Autofac.dll) Version: 6.0.0+39696a967e8826f7f1ebc8c1ff4523c9dd75abe0
Syntax Object CreateSharedInstance(
Guid primaryId,
Nullable<Guid> qualifyingId,
Func<Object> creator
)
Function CreateSharedInstance (
primaryId As Guid,
qualifyingId As Nullable(Of Guid),
creator As Func(Of Object)
) As Object
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:
ObjectThe shared instance.
See Also