File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -13,4 +13,5 @@ for path in test/*.Tests/*.csproj; do
13
13
done
14
14
15
15
cd sample/Sample/
16
- dotnet run -f netcoreapp2.0 -c Release
16
+ dotnet build -f netcoreapp2.0 -c Release
17
+ dotnet bin/Release/netcoreapp2.0/Sample.dll --run-once
Original file line number Diff line number Diff line change 3
3
using Microsoft . Extensions . Configuration ;
4
4
using Serilog ;
5
5
using System . IO ;
6
-
6
+ using System . Linq ;
7
7
using Serilog . Core ;
8
8
using Serilog . Events ;
9
9
@@ -22,6 +22,8 @@ public static void Main(string[] args)
22
22
. ReadFrom . Configuration ( configuration )
23
23
. CreateLogger ( ) ;
24
24
25
+ logger . Information ( "Args: {a}" , args ) ;
26
+
25
27
do
26
28
{
27
29
logger . ForContext < Program > ( ) . Information ( "Hello, world!" ) ;
@@ -32,7 +34,7 @@ public static void Main(string[] args)
32
34
33
35
Console . WriteLine ( ) ;
34
36
}
35
- while ( Console . ReadKey ( ) . KeyChar != 'q' ) ;
37
+ while ( ! args . Contains ( "--run-once" ) && ( Console . ReadKey ( ) . KeyChar != 'q' ) ) ;
36
38
}
37
39
}
38
40
You can’t perform that action at this time.
0 commit comments