NETConfig.DBBuilder
Builder for the netconfig data store reference, shaped for DataStoreReferenceProvider3.Builder.AddReference3.
|
Note
|
AddReference3<TReferenceBuilder> demand exactly two things, and both are why this type look the way it does: a single IKeyedServiceProvider constructor parameter (it is activated through ActivatorUtilities), and IBuilder<ICanGetAnyUnitOfWork>. The reference itself serve ONE unit of work type, so Build() adapt it through the netbase SingleAsAnyUnitOfWorkDataStoreReference<TUnitOfWork> - same adaptation VirtualizationDataStoreReferenceProvider3 do for the hypervisor references.
|
public sealed class NETConfig.DBBuilder : IBuilder<ICanGetAnyUnitOfWork>
1. Constructors
1.1. DBBuilder(IKeyedServiceProvider)
Initialises a new instance of the NETConfig.DBBuilder class.
public DBBuilder(IKeyedServiceProvider keyedServiceProvider)
| Name | Type | Description |
|---|---|---|
keyedServiceProvider |
IKeyedServiceProvider |
Service provider, handed in by |
2. Methods
2.1. Build()
Build the reference.
public ICanGetAnyUnitOfWork Build()
Returns: ICanGetAnyUnitOfWork — The reference, as the any-unit-of-work view AddReference3 expect.
2.2. WithConfig(NETSetupConfig)
Set the config that IS the database (required).
public NETConfig.DBBuilder WithConfig(NETSetupConfig config)
| Name | Type | Description |
|---|---|---|
config |
NETSetupConfig |
A translated |
Returns: NETConfig.DBBuilder — This builder.
2.3. WithDataStoreName(IDataStoreKey)
Override the data store key.
public NETConfig.DBBuilder WithDataStoreName(IDataStoreKey dataStoreName)
| Name | Type | Description |
|---|---|---|
dataStoreName |
IDataStoreKey |
Key to register the store under. |
Returns: NETConfig.DBBuilder — This builder.
2.4. WithLogger(ILogger)
Set the logger a per-record commit failure is written to.
public NETConfig.DBBuilder WithLogger(ILogger logger)
| Name | Type | Description |
|---|---|---|
logger |
ILogger |
Logger. |
Returns: NETConfig.DBBuilder — This builder.