Exemple #1
0
        public static void Main(string[] args)
        {
            var            builder       = new ConfigurationBuilder().AddJsonFile("appsettings.json");
            IConfiguration configuration = builder.Build();

            LocalInfo.Create(configuration, new MyLogger());
            LocalInfo.Get().StartLoop();
            //CreateHostBuilder(args).Build().Run();
        }
Exemple #2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILogger <Startup> logger)
        {
            LocalInfo.Create(this.Configuration, logger);
            LocalInfo.Get().StartLoop();
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                app.UseSwagger();
                app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "ProxyManagerWorker v1"));
            }

            app.UseHttpsRedirection();

            app.UseRouting();

            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
        }
Exemple #3
0
 public static LocalInfo Create(IConfiguration configuration, ILogger logger)
 {
     _l = new LocalInfo(configuration, logger);
     return(_l);
 }