public void ConfigureServices(IServiceCollection services) { services.AddSingleton <ILogger>((x) => _logger); services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); services.AddSignalR(); AppInitialise.AddServices(services, new [] { typeof(BitmexService) }); }
private static void ConfigureServices(IServiceCollection services) { services.AddSingleton <ILoggerFactory, LoggerFactory>(); services.AddSingleton(typeof(ILogger <>), typeof(Logger <>)); _logger = NLogBuilder.ConfigureNLog($"{AppDomain.CurrentDomain.BaseDirectory}/nlog.config").GetCurrentClassLogger(); AppInitialise.AddServices(services, new[] { typeof(BitmexService) }); services.AddTransient <App>(); }
public void ConfigureServices(IServiceCollection services) { services.AddSingleton <ILogger>((x) => _logger); services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); AppInitialise.AddServices(services); services.AddSignalR(x => x.EnableDetailedErrors = true); services.AddSingleton <OrdersHubControl>(); }