Пример #1
0
 public Startup(IConfiguration configuration, IHostingEnvironment environment)
 {
     Configuration          = configuration;
     DBServer.configuration = Configuration;
     DBServer.setConnectionString();
     TypesToRegister = Assembly.LoadFrom(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\solar.services.dll")
                       .GetTypes()
                       .Where(x => !string.IsNullOrEmpty(x.Namespace))
                       .Where(x => x.IsClass)
                       .Where(x => x.Namespace.StartsWith("solar.services")).ToList();
     TypesToRegister.AddRange(Assembly.LoadFrom(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\solar.repo.dll")
                              .GetTypes()
                              .Where(x => !string.IsNullOrEmpty(x.Namespace))
                              .Where(x => x.IsClass)
                              .Where(x => x.Namespace.StartsWith("solar.repo")));
     SystemConstants.JWT = Configuration.GetSection("SystemKeys").GetValue <String>("JWT");
 }