Squirrowse/Squirrowse.Core/CoreModule.cs

17 lines
550 B
C#
Raw Normal View History

2019-11-04 09:29:37 +01:00
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
2019-11-06 17:02:06 +01:00
using Squirrowse.Core.Services;
namespace Squirrowse.Core
{
public static class CoreModule
{
public static IServiceCollection AddCoreModule(this IServiceCollection services)
{
services.AddSingleton(typeof(ILogger<>), typeof(Logger<>));
2019-11-07 11:52:27 +01:00
services.AddSingleton<IConnectionManager, ConnectionManager>(x =>
2019-11-06 17:02:06 +01:00
new ConnectionManager("http://localhost", 5000));
return services;
}
}
2019-11-04 09:29:37 +01:00
}