Skip to content

Commit b1a0684

Browse files
committed
yak
1 parent 3363e61 commit b1a0684

File tree

9 files changed

+12
-14
lines changed

9 files changed

+12
-14
lines changed

examples/dotnet-grpc/DN_Client/Program.cs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using Hyper;
44
using MegaCorp;
55
using System;
6-
using System.Net.Http;
76
using System.Threading.Tasks;
87

98
namespace Client

examples/dotnet-grpc/DN_Server/Program.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Microsoft.AspNetCore;
22
using Microsoft.AspNetCore.Hosting;
33
using Microsoft.AspNetCore.Server.Kestrel.Core;
4-
using Microsoft.Extensions.Hosting;
54

65
namespace DN_Server
76
{

examples/pb-net/JustProtos/SomeType.cs

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ static void Foo()
1717
typeof(TimeResult),
1818
typeof(MultiplyRequest),
1919
};
20+
_ = types;
2021
}
2122
}
2223
#pragma warning restore IDE0051, IDE0059

examples/perf/PerfClient/CodeFirst.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ public sealed class IncrementResult
1414
[ServiceContract(Name = "PerfTest.VanillaGrpc")]
1515
public interface IVanillaGrpc
1616
{
17-
public Task IncrementAsync();
17+
Task IncrementAsync();
1818

19-
public Task<IncrementResult> ResetAsync();
19+
Task<IncrementResult> ResetAsync();
2020
}
2121

2222
[ServiceContract(Name = "PerfTest.ProtobufNetGrpc")]
2323
public interface IProtobufNetGrpc
2424
{
25-
public Task IncrementAsync();
25+
Task IncrementAsync();
2626

27-
public Task<IncrementResult> ResetAsync();
27+
Task<IncrementResult> ResetAsync();
2828
}
2929
}

examples/perf/PerfServer/Program.cs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using Microsoft.AspNetCore;
33
using Microsoft.AspNetCore.Hosting;
44
using Microsoft.AspNetCore.Server.Kestrel.Core;
5-
using Microsoft.Extensions.Hosting;
65
using PerfTest;
76
using ProtoBuf.Grpc.Server;
87

src/protobuf-net.Grpc.AspNetCore.Reflection/ReflectionExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static IServiceCollection AddCodeFirstGrpcReflection(this IServiceCollect
4545

4646
// ReflectionService is designed to be a singleton
4747
// Explicitly register creating it in DI using descriptors calculated from gRPC endpoints in the app
48-
services.TryAddSingleton<ReflectionService>(serviceProvider =>
48+
services.TryAddSingleton(serviceProvider =>
4949
{
5050
var binderConfiguration = serviceProvider.GetService<BinderConfiguration>();
5151
var endpointDataSource = serviceProvider.GetRequiredService<EndpointDataSource>();

src/protobuf-net.Grpc/Client/GrpcClientFactory.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ namespace ProtoBuf.Grpc.Client
1010
/// </summary>
1111
public static class GrpcClientFactory
1212
{
13-
private const string Switch_AllowUnencryptedHttp2 = "System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport";
13+
private const string SwitchAllowUnencryptedHttp2 = "System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport";
1414
/// <summary>
1515
/// Allows HttpClient to use HTTP/2 without TLS
1616
/// </summary>
1717
public static bool AllowUnencryptedHttp2
1818
{
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);
2121
}
2222

2323
/// <summary>

tests/protobuf-net.Grpc.Test.Integration/Issues/Issue107.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
using System.Threading.Tasks;
1212
using Xunit;
1313
using Xunit.Abstractions;
14-
14+
#nullable disable
1515
namespace protobuf_net.Grpc.Test.Integration.Issues
1616
{
1717
public class Issue107 : IClassFixture<Issue107.MyServer<Issue107.Derived<string>>>
@@ -26,7 +26,7 @@ static MyServerBase()
2626
}
2727
public class MyServer<T> : MyServerBase, IDisposable, ICalculatorService<T>
2828
{
29-
Server _server;
29+
private readonly Server _server;
3030
public MyServer()
3131
{
3232
_server = new Server

tests/protobuf-net.Grpc.Test.Integration/Issues/SO62732593.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.ServiceModel;
66
using System.Threading.Tasks;
77
using Xunit;
8-
8+
#nullable disable
99
namespace protobuf_net.Grpc.Test.Integration.Issues
1010
{
1111
public class SO62732593

0 commit comments

Comments
 (0)