File tree 9 files changed +12
-14
lines changed
protobuf-net.Grpc.AspNetCore.Reflection
tests/protobuf-net.Grpc.Test.Integration/Issues
9 files changed +12
-14
lines changed Original file line number Diff line number Diff line change 3
3
using Hyper ;
4
4
using MegaCorp ;
5
5
using System ;
6
- using System . Net . Http ;
7
6
using System . Threading . Tasks ;
8
7
9
8
namespace Client
Original file line number Diff line number Diff line change 1
1
using Microsoft . AspNetCore ;
2
2
using Microsoft . AspNetCore . Hosting ;
3
3
using Microsoft . AspNetCore . Server . Kestrel . Core ;
4
- using Microsoft . Extensions . Hosting ;
5
4
6
5
namespace DN_Server
7
6
{
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ static void Foo()
17
17
typeof ( TimeResult ) ,
18
18
typeof ( MultiplyRequest ) ,
19
19
} ;
20
+ _ = types ;
20
21
}
21
22
}
22
23
#pragma warning restore IDE0051 , IDE0059
Original file line number Diff line number Diff line change @@ -14,16 +14,16 @@ public sealed class IncrementResult
14
14
[ ServiceContract ( Name = "PerfTest.VanillaGrpc" ) ]
15
15
public interface IVanillaGrpc
16
16
{
17
- public Task IncrementAsync ( ) ;
17
+ Task IncrementAsync ( ) ;
18
18
19
- public Task < IncrementResult > ResetAsync ( ) ;
19
+ Task < IncrementResult > ResetAsync ( ) ;
20
20
}
21
21
22
22
[ ServiceContract ( Name = "PerfTest.ProtobufNetGrpc" ) ]
23
23
public interface IProtobufNetGrpc
24
24
{
25
- public Task IncrementAsync ( ) ;
25
+ Task IncrementAsync ( ) ;
26
26
27
- public Task < IncrementResult > ResetAsync ( ) ;
27
+ Task < IncrementResult > ResetAsync ( ) ;
28
28
}
29
29
}
Original file line number Diff line number Diff line change 2
2
using Microsoft . AspNetCore ;
3
3
using Microsoft . AspNetCore . Hosting ;
4
4
using Microsoft . AspNetCore . Server . Kestrel . Core ;
5
- using Microsoft . Extensions . Hosting ;
6
5
using PerfTest ;
7
6
using ProtoBuf . Grpc . Server ;
8
7
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public static IServiceCollection AddCodeFirstGrpcReflection(this IServiceCollect
45
45
46
46
// ReflectionService is designed to be a singleton
47
47
// Explicitly register creating it in DI using descriptors calculated from gRPC endpoints in the app
48
- services . TryAddSingleton < ReflectionService > ( serviceProvider =>
48
+ services . TryAddSingleton ( serviceProvider =>
49
49
{
50
50
var binderConfiguration = serviceProvider . GetService < BinderConfiguration > ( ) ;
51
51
var endpointDataSource = serviceProvider . GetRequiredService < EndpointDataSource > ( ) ;
Original file line number Diff line number Diff line change @@ -10,14 +10,14 @@ namespace ProtoBuf.Grpc.Client
10
10
/// </summary>
11
11
public static class GrpcClientFactory
12
12
{
13
- private const string Switch_AllowUnencryptedHttp2 = "System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport" ;
13
+ private const string SwitchAllowUnencryptedHttp2 = "System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport" ;
14
14
/// <summary>
15
15
/// Allows HttpClient to use HTTP/2 without TLS
16
16
/// </summary>
17
17
public static bool AllowUnencryptedHttp2
18
18
{
19
- get => AppContext . TryGetSwitch ( Switch_AllowUnencryptedHttp2 , out var enabled ) && enabled ;
20
- set => AppContext . SetSwitch ( Switch_AllowUnencryptedHttp2 , value ) ;
19
+ get => AppContext . TryGetSwitch ( SwitchAllowUnencryptedHttp2 , out var enabled ) && enabled ;
20
+ set => AppContext . SetSwitch ( SwitchAllowUnencryptedHttp2 , value ) ;
21
21
}
22
22
23
23
/// <summary>
Original file line number Diff line number Diff line change 11
11
using System . Threading . Tasks ;
12
12
using Xunit ;
13
13
using Xunit . Abstractions ;
14
-
14
+ #nullable disable
15
15
namespace protobuf_net . Grpc . Test . Integration . Issues
16
16
{
17
17
public class Issue107 : IClassFixture < Issue107 . MyServer < Issue107 . Derived < string > > >
@@ -26,7 +26,7 @@ static MyServerBase()
26
26
}
27
27
public class MyServer < T > : MyServerBase , IDisposable , ICalculatorService < T >
28
28
{
29
- Server _server ;
29
+ private readonly Server _server ;
30
30
public MyServer ( )
31
31
{
32
32
_server = new Server
Original file line number Diff line number Diff line change 5
5
using System . ServiceModel ;
6
6
using System . Threading . Tasks ;
7
7
using Xunit ;
8
-
8
+ #nullable disable
9
9
namespace protobuf_net . Grpc . Test . Integration . Issues
10
10
{
11
11
public class SO62732593
You can’t perform that action at this time.
0 commit comments