Class ScopeFactory
Exposes the underlying IScopeFactory implementation.
Inheritance
System.Object
ScopeFactory
Namespace: Solti.Utils.DI
Assembly: Solti.Utils.DI.dll
Syntax
public static class ScopeFactory : Object
Methods
Create(IServiceCollection, ScopeOptions, Object)
Creates a new scope factory. The returned instance defines the root scope too.
Declaration
public static IScopeFactory Create(IServiceCollection services, ScopeOptions options = null, object tag = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services | Register services. |
| ScopeOptions | options | The ScopeOptions to be applied against all the created scopes. |
| System.Object | tag | Optional user defined data to be bound to the root. |
Returns
| Type | Description |
|---|---|
| IScopeFactory |
Create(Action<IServiceCollection>, ScopeOptions, Object)
Creates a new scope factory. The returned instance defines the root scope too.
Declaration
public static IScopeFactory Create(Action<IServiceCollection> registerServices, ScopeOptions scopeOptions = null, object tag = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Action<IServiceCollection> | registerServices | The callback to register services. |
| ScopeOptions | scopeOptions | The ScopeOptions to be applied against all the created scopes. |
| System.Object | tag | Optional user defined data to be bound to the root. |
Returns
| Type | Description |
|---|---|
| IScopeFactory |