You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.3 KiB
43 lines
1.3 KiB
using Infrastructure.Email;
|
|
using Infrastructure.Sms;
|
|
using Infrastructure.UI;
|
|
using IoT.UI.Shard;
|
|
using IoTCenter.Services;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
using Microsoft.AspNetCore.Routing;
|
|
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace IoTCenter
|
|
{
|
|
public class Startup : IoTServiceStartup
|
|
{
|
|
private readonly IWebHostEnvironment _env;
|
|
|
|
public Startup(IConfiguration configuration, IWebHostEnvironment env) : base(configuration, env)
|
|
{
|
|
this._env = env;
|
|
}
|
|
|
|
public override void ConfigureServices(IServiceCollection services)
|
|
{
|
|
services.AddTransient<IEmailSender, EmptyEmailSender>();
|
|
services.AddTransient<ISmsSender, EmptySmsSender>();
|
|
services.AddTransient<EventJob>();
|
|
base.ConfigureServices(services);
|
|
}
|
|
|
|
public override void ConfigureOptions(IServiceCollection services)
|
|
{
|
|
Console.WriteLine(IoT.Resources.Resource.WebFolder);
|
|
services.ConfigureOptions(new FileConfigureOptions(_env, new List<string> { "IoT.Shared", "IoT.Resources" }));
|
|
}
|
|
|
|
public override void UseSignalR(IEndpointRouteBuilder endpoints)
|
|
{
|
|
this.UseSignalR<IoTCenterHub>(endpoints);
|
|
}
|
|
}
|
|
} |