Enabled ability to order containers and the ability to insert new containers to their correct order
This commit is contained in:
@@ -10,13 +10,16 @@ public class ComponentHost(IServiceProvider services,
|
||||
{
|
||||
public IServiceProvider Services => services;
|
||||
|
||||
public ComponentConfiguration? Configuration =>
|
||||
Services.GetService<ComponentConfiguration>();
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public TConfiguration? GetConfiguration<TConfiguration>() where TConfiguration : ComponentConfiguration
|
||||
{
|
||||
return Services.GetService<TConfiguration>();
|
||||
}
|
||||
|
||||
public async Task StartAsync(CancellationToken cancellationToken = default)
|
||||
{
|
||||
foreach (IInitializer initializer in initializers)
|
||||
|
||||
@@ -5,5 +5,5 @@ namespace Toolkit.Foundation;
|
||||
public interface IComponentHost :
|
||||
IHost
|
||||
{
|
||||
ComponentConfiguration? Configuration { get; }
|
||||
TConfiguration? GetConfiguration<TConfiguration>() where TConfiguration : ComponentConfiguration;
|
||||
}
|
||||
Reference in New Issue
Block a user