Class MultiRegisterOptions
Registration options for "fluent" API when registering multiple implementations.
Inherited Members
Namespace: Swan.DependencyInjection
Syntax
public sealed class MultiRegisterOptions
Constructors
MultiRegisterOptions(IEnumerable<RegisterOptions>)
Initializes a new instance of the MultiRegisterOptions class.
Declaration
public MultiRegisterOptions(IEnumerable<RegisterOptions> registerOptions)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<RegisterOptions> | registerOptions | The register options. |
Methods
AsMultiInstance()
Make registration multi-instance if possible.
Declaration
public MultiRegisterOptions AsMultiInstance()
Returns
Type | Description |
---|---|
MultiRegisterOptions | A registration multi-instance for fluent API. |
Exceptions
Type | Condition |
---|---|
DependencyContainerRegistrationException | Generic Constraint Registration Exception. |
AsSingleton()
Make registration a singleton (single instance) if possible.
Declaration
public MultiRegisterOptions AsSingleton()
Returns
Type | Description |
---|---|
MultiRegisterOptions | A registration multi-instance for fluent API. |
Exceptions
Type | Condition |
---|---|
DependencyContainerRegistrationException | Generic Constraint Registration Exception. |