-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
up-for-grabsHelp is needed on this oneHelp is needed on this one
Description
Use case:
public interface IAzureInitializer
{
}
public interface IAzureInitializer<in TAzureModel> : IAzureInitializer where TAzureModel : class, IAzureModel, new()
{
Task<AzureIndexOperationResult> InitializeAsync();
}
//...
public class SomeStartupService
{
private readonly IEnumerable<IAzureInitializer> _initializers;
public SomeStartupService(IEnumerable<IAzureInitializer> initializers)
=> _initializers = initializers;
public async Task InitializeAll()
{
foreach(var initializer in _initializers)
{
_ = await initializer.InitializeAsync();
}
}
}
Metadata
Metadata
Assignees
Labels
up-for-grabsHelp is needed on this oneHelp is needed on this one