Class Generator<TService, TOptions>
Lazy generator to create multiple new services/objects of a specific type.
[InternalApi_DoNotUse_MayChangeWithoutNotice]
public class Generator<TService, TOptions> : IHasLog where TService : IServiceWithSetup<TOptions> where TOptions : class
  Type Parameters
TServiceTOptions
- Inheritance
 - 
      objectGenerator<TService, TOptions>
 
- Implements
 
Remarks
Constructor should only be used in DI context and never be called directly.
Constructors
Generator(IServiceProvider)
Lazy generator to create multiple new services/objects of a specific type.
public Generator(IServiceProvider sp)
  Parameters
Remarks
Constructor should only be used in DI context and never be called directly.
Properties
Log
The parent log, which is attached to newly generated objects if they support logging.
public ILog? Log { get; }
  Property Value
Methods
New(TOptions)
Factory method to generate a new service
public TService New(TOptions options)
  Parameters
optionsTOptions
Returns
- TService
 
SetInit(Action<TService>)
Set the init-command as needed
public Generator<TService, TOptions> SetInit(Action<TService> newInitCall)
  Parameters
newInitCallAction<TService>
Returns
- Generator<TService, TOptions>