Wrap FluentAvalonia controls within same named classes allowing us to declare the xmlns namespace in our assembly
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Toolkit.Foundation;
|
||||
|
||||
public class Initialization : IInitialization
|
||||
{
|
||||
private readonly Func<IEnumerable<IInitializable?>> factory;
|
||||
|
||||
public Initialization(Func<IEnumerable<IInitializable?>> factory)
|
||||
{
|
||||
this.factory = factory;
|
||||
}
|
||||
|
||||
public async Task InitializeAsync()
|
||||
{
|
||||
foreach (IInitializable? initializer in factory())
|
||||
{
|
||||
if (initializer is not null)
|
||||
{
|
||||
Trace.WriteLine(initializer.GetType());
|
||||
await initializer.InitializeAsync();
|
||||
Trace.WriteLine("Done");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user