-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #280 from sungam3r/style
Code cleanup
- Loading branch information
Showing
52 changed files
with
2,819 additions
and
2,943 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
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<LangVersion>latest</LangVersion> | ||
<TreatWarningsAsErrors>True</TreatWarningsAsErrors> | ||
<SignAssembly>true</SignAssembly> | ||
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign> | ||
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)assets/Serilog.snk</AssemblyOriginatorKeyFile> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
</PropertyGroup> | ||
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'"> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
</ItemGroup> | ||
</Project> |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<Project> | ||
|
||
<ItemGroup> | ||
<Using Remove="System.Net.Http" /> | ||
</ItemGroup> | ||
|
||
</Project> |
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,6 +1,6 @@ | ||
#!/bin/bash | ||
#!/bin/bash | ||
|
||
set -e | ||
set -e | ||
dotnet --info | ||
dotnet --list-sdks | ||
dotnet restore | ||
|
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,38 +1,35 @@ | ||
using System; | ||
using System.IO; | ||
using Serilog; | ||
using Serilog.Debugging; | ||
|
||
namespace Sample | ||
namespace Sample; | ||
|
||
public class Program | ||
{ | ||
public class Program | ||
public static void Main(string[] args) | ||
{ | ||
public static void Main(string[] args) | ||
{ | ||
SelfLog.Enable(Console.Out); | ||
SelfLog.Enable(Console.Out); | ||
|
||
var sw = System.Diagnostics.Stopwatch.StartNew(); | ||
var sw = System.Diagnostics.Stopwatch.StartNew(); | ||
|
||
Log.Logger = new LoggerConfiguration() | ||
.WriteTo.File("log.txt") | ||
.CreateLogger(); | ||
Log.Logger = new LoggerConfiguration() | ||
.WriteTo.File("log.txt") | ||
.CreateLogger(); | ||
|
||
for (var i = 0; i < 1000000; ++i) | ||
{ | ||
Log.Information("Hello, file logger!"); | ||
} | ||
for (var i = 0; i < 1000000; ++i) | ||
{ | ||
Log.Information("Hello, file logger!"); | ||
} | ||
|
||
Log.CloseAndFlush(); | ||
Log.CloseAndFlush(); | ||
|
||
sw.Stop(); | ||
sw.Stop(); | ||
|
||
Console.WriteLine($"Elapsed: {sw.ElapsedMilliseconds} ms"); | ||
Console.WriteLine($"Size: {new FileInfo("log.txt").Length}"); | ||
Console.WriteLine($"Elapsed: {sw.ElapsedMilliseconds} ms"); | ||
Console.WriteLine($"Size: {new FileInfo("log.txt").Length}"); | ||
|
||
Console.WriteLine("Press any key to delete the temporary log file..."); | ||
Console.ReadKey(true); | ||
Console.WriteLine("Press any key to delete the temporary log file..."); | ||
Console.ReadKey(true); | ||
|
||
File.Delete("log.txt"); | ||
} | ||
File.Delete("log.txt"); | ||
} | ||
} |
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
Oops, something went wrong.