Esempio n. 1
0
        public static void Main(string[] args)
        {
            //var webHost = BuildWebHost;
            //LogConfiguration.Configure();
            //webHost.Run();
            LogConfiguration.Configure();
            var webHost = CreateWebHostBuilder(args);

            webHost.Build().Run();
        }
Esempio n. 2
0
        public static void Main(string[] args)
        {
            LogConfiguration.Configure();

            Log.Logger.Information("----------------------------------------");
            Log.Logger.Information("---  Starting service  -----------------");
            Log.Logger.Information("----------------------------------------");

            CreateHostBuilder(args).Build().Run();
        }
Esempio n. 3
0
        public static void Main(string[] args)
        {
            AppContext.SetSwitch(
                "System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);

            LogConfiguration.Configure();

            Log.Logger.Information("----------------------------------------");
            Log.Logger.Information("---  Starting service  -----------------");
            Log.Logger.Information("----------------------------------------");

            CreateHostBuilder(args).Build().Run();
        }
Esempio n. 4
0
        public void ConfigureServices(IServiceCollection services)
        {
            LogConfiguration.Configure();

            services.AddOptions();
            services.AddMvc()
            .AddFluentValidation()
            .SetCompatibilityVersion(CompatibilityVersion.Version_2_2);

            services.AddTransient <IValidator <MessageModel>, MessageValidator>();
            services.AddSingleton <IEncryptationService, EncryptationService>();

            services.ConfigureSwagger();
        }