File tree 4 files changed +13
-6
lines changed
4 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 29
29
using Google . Protobuf ;
30
30
using Grpc . Auth ;
31
31
using Grpc . Core ;
32
- using Grpc . Core . Utils ;
33
32
using Grpc . Net . Client ;
34
33
using Grpc . Testing ;
35
34
using Microsoft . Extensions . DependencyInjection ;
36
35
using Microsoft . Extensions . Logging ;
37
- using Microsoft . Extensions . Logging . Console ;
38
36
using Newtonsoft . Json . Linq ;
39
37
40
38
namespace InteropTestsClient
@@ -101,7 +99,6 @@ private InteropClient(ClientOptions options)
101
99
configure . AddSimpleConsole ( loggerOptions =>
102
100
{
103
101
loggerOptions . IncludeScopes = true ;
104
- loggerOptions . ColorBehavior = LoggerColorBehavior . Disabled ;
105
102
} ) ;
106
103
} ) ;
107
104
Original file line number Diff line number Diff line change 17
17
#endregion
18
18
19
19
using System ;
20
+ using System . Reflection ;
20
21
21
22
namespace InteropTestsClient
22
23
{
@@ -26,6 +27,9 @@ public static void Main(string[] args)
26
27
{
27
28
Console . WriteLine ( "Application started." ) ;
28
29
30
+ var runtimeVersion = typeof ( object ) . GetTypeInfo ( ) . Assembly . GetCustomAttribute < AssemblyInformationalVersionAttribute > ( ) ? . InformationalVersion ?? "Unknown" ;
31
+ Console . WriteLine ( $ "NetCoreAppVersion: { runtimeVersion } ") ;
32
+
29
33
InteropClient . Run ( args ) ;
30
34
}
31
35
}
Original file line number Diff line number Diff line change 23
23
using Microsoft . Extensions . Configuration ;
24
24
using Microsoft . Extensions . Hosting ;
25
25
using Microsoft . Extensions . Logging ;
26
- using Microsoft . Extensions . Logging . Console ;
27
26
28
27
namespace InteropTestsWebsite
29
28
{
@@ -38,7 +37,7 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
38
37
Host . CreateDefaultBuilder ( args )
39
38
. ConfigureLogging ( builder =>
40
39
{
41
- builder . AddSimpleConsole ( o => o . ColorBehavior = LoggerColorBehavior . Disabled ) ;
40
+ builder . AddSimpleConsole ( ) ;
42
41
builder . SetMinimumLevel ( LogLevel . Trace ) ;
43
42
} )
44
43
. ConfigureWebHostDefaults ( webBuilder =>
Original file line number Diff line number Diff line change 17
17
#endregion
18
18
19
19
using System ;
20
+ using System . Reflection ;
20
21
using Grpc . Testing ;
21
22
using Microsoft . AspNetCore . Builder ;
22
23
using Microsoft . Extensions . DependencyInjection ;
@@ -37,7 +38,13 @@ public void ConfigureServices(IServiceCollection services)
37
38
public void Configure ( IApplicationBuilder app , IHostApplicationLifetime applicationLifetime )
38
39
{
39
40
// Required to notify test infrastructure that it can begin tests
40
- applicationLifetime . ApplicationStarted . Register ( ( ) => Console . WriteLine ( "Application started." ) ) ;
41
+ applicationLifetime . ApplicationStarted . Register ( ( ) =>
42
+ {
43
+ Console . WriteLine ( "Application started." ) ;
44
+
45
+ var runtimeVersion = typeof ( object ) . GetTypeInfo ( ) . Assembly . GetCustomAttribute < AssemblyInformationalVersionAttribute > ( ) ? . InformationalVersion ?? "Unknown" ;
46
+ Console . WriteLine ( $ "NetCoreAppVersion: { runtimeVersion } ") ;
47
+ } ) ;
41
48
42
49
app . UseRouting ( ) ;
43
50
app . UseEndpoints ( endpoints =>
You can’t perform that action at this time.
0 commit comments