Fix build warnings and errors.

This commit is contained in:
Christian Kratky
2020-04-04 19:40:09 +02:00
parent fc358f9015
commit 54870adc64
15 changed files with 90 additions and 57 deletions
+15 -7
View File
@@ -1,8 +1,8 @@
using System;
using System.Reflection;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using MQTTnet.Server.Web;
using System;
using System.Reflection;
namespace MQTTnet.Server
{
@@ -14,7 +14,15 @@ namespace MQTTnet.Server
{
PrintLogo();
WebHost.CreateDefaultBuilder(args).UseStartup<Startup>().Build().Run();
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.ConfigureKestrel(serverOptions =>
{
})
.UseStartup<Startup>();
}).Build().Run();
return 0;
}
@@ -25,7 +33,7 @@ namespace MQTTnet.Server
}
}
private static void PrintLogo()
static void PrintLogo()
{
Console.ResetColor();
Console.ForegroundColor = ConsoleColor.Red;
@@ -46,7 +54,7 @@ namespace MQTTnet.Server
Console.WriteLine();
Console.ForegroundColor = ConsoleColor.White;
Console.WriteLine("The official MQTT server implementation of MQTTnet");
Console.WriteLine("Copyright (c) 2017-2019 The MQTTnet Team");
Console.WriteLine("Copyright (c) 2017-2020 The MQTTnet Team");
Console.WriteLine(@"https://github.com/chkr1011/MQTTnet");
Console.ForegroundColor = ConsoleColor.White;