2019-11-04 09:29:37 +01:00
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
2019-10-31 17:00:52 +01:00
|
|
|
|
using Microsoft.Extensions.Logging;
|
2019-11-06 17:02:06 +01:00
|
|
|
|
using Squirrowse.Core.Services;
|
2019-10-31 17:00:52 +01:00
|
|
|
|
|
|
|
|
|
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));
|
2019-10-31 17:00:52 +01:00
|
|
|
|
return services;
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-11-04 09:29:37 +01:00
|
|
|
|
}
|