code sweep
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace Toolkit.Foundation;
|
||||
namespace Toolkit.Framework.Foundation;
|
||||
|
||||
public static class IHostBuilderExtensions
|
||||
{
|
||||
@@ -13,4 +13,4 @@ public static class IHostBuilderExtensions
|
||||
|
||||
return hostBuilder.UseContentRoot(contentRoot);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
|
||||
namespace Toolkit.Foundation;
|
||||
namespace Toolkit.Framework.Foundation;
|
||||
|
||||
public static class IServiceCollectionExtensions
|
||||
{
|
||||
@@ -11,7 +11,6 @@ public static class IServiceCollectionExtensions
|
||||
return serviceCollection;
|
||||
}
|
||||
|
||||
|
||||
public static IServiceCollection AddFoundation(this IServiceCollection serviceCollection)
|
||||
{
|
||||
serviceCollection.AddSingleton<IServiceFactory>(provider => new ServiceFactory(provider.GetService, (instanceType, parameters) => ActivatorUtilities.CreateInstance(provider, instanceType, parameters!)))
|
||||
@@ -27,4 +26,4 @@ public static class IServiceCollectionExtensions
|
||||
|
||||
return serviceCollection;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Toolkit.Foundation;
|
||||
namespace Toolkit.Framework.Foundation;
|
||||
|
||||
public static class IServiceFactoryExtensions
|
||||
{
|
||||
@@ -12,4 +12,4 @@ public static class IServiceFactoryExtensions
|
||||
ServiceFactoryDescriptor? descriptor = new(serviceFactory);
|
||||
return descriptor.Create(type);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user