forked from julianperrott/WowClassicGrindBot
-
-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Solution: Update File Scoped Namespace usage
- Loading branch information
Showing
259 changed files
with
20,070 additions
and
20,195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,48 @@ | ||
using System; | ||
|
||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.Extensions.Hosting; | ||
using Microsoft.Extensions.Logging; | ||
|
||
using Serilog; | ||
using System; | ||
|
||
namespace BlazorServer | ||
namespace BlazorServer; | ||
|
||
public static class Program | ||
{ | ||
public static class Program | ||
{ | ||
private static string hostUrl = "http://0.0.0.0:5000"; | ||
private const string hostUrl = "http://0.0.0.0:5000"; | ||
|
||
public static void Main(string[] args) | ||
public static void Main(string[] args) | ||
{ | ||
while (true) | ||
{ | ||
while (true) | ||
Log.Information("Program.Main(): Starting blazor server"); | ||
try | ||
{ | ||
CreateHostBuilder(args) | ||
.Build() | ||
.Run(); | ||
} | ||
catch (Exception ex) | ||
{ | ||
Log.Information("Program.Main(): Starting blazor server"); | ||
try | ||
{ | ||
CreateHostBuilder(args) | ||
.Build() | ||
.Run(); | ||
} | ||
catch (Exception ex) | ||
{ | ||
Log.Information($"Program.Main(): {ex.Message}"); | ||
Log.Information(""); | ||
System.Threading.Thread.Sleep(3000); | ||
} | ||
Log.Information($"Program.Main(): {ex.Message}"); | ||
Log.Information(""); | ||
System.Threading.Thread.Sleep(3000); | ||
} | ||
} | ||
} | ||
|
||
public static IHostBuilder CreateHostBuilder(string[] args) => | ||
public static IHostBuilder CreateHostBuilder(string[] args) => | ||
|
||
Host.CreateDefaultBuilder(args) | ||
.ConfigureWebHostDefaults(webBuilder => | ||
{ | ||
webBuilder.UseUrls(hostUrl); | ||
webBuilder.UseStartup<Startup>(); | ||
}) | ||
.ConfigureLogging((hostingContext, logging) => | ||
Host.CreateDefaultBuilder(args) | ||
.ConfigureWebHostDefaults(webBuilder => | ||
{ | ||
logging.AddConsole(); | ||
logging.AddEventSourceLogger(); | ||
}); | ||
} | ||
webBuilder.UseUrls(hostUrl); | ||
webBuilder.UseStartup<Startup>(); | ||
}) | ||
.ConfigureLogging((hostingContext, logging) => | ||
{ | ||
logging.AddConsole(); | ||
logging.AddEventSourceLogger(); | ||
}); | ||
} |
Oops, something went wrong.