Skip to content

Commit 5fcd8c0

Browse files
committed
I cut the yak accidentally
1 parent ed20a29 commit 5fcd8c0

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<IncludeSymbols>false</IncludeSymbols>
2323
<IsTestProject>$(MSBuildProjectName.Contains('Test'))</IsTestProject>
2424
<Nullable>enable</Nullable>
25-
<LangVersion>preview</LangVersion>
25+
<LangVersion>8.0</LangVersion>
2626
<!--<CodeAnalysisRuleset>$(MSBuildThisFileDirectory)Shared.ruleset</CodeAnalysisRuleset>-->
2727

2828
<ExampleRefs>local</ExampleRefs> <!-- local or nuget-->

examples/pb-net-grpc/Client_FS/Client_FS.fsproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<OutputType>Exe</OutputType>
66
<TargetFramework>netcoreapp3.0</TargetFramework>
77
<SignAssembly>false</SignAssembly>
8+
<LangVersion>4.7</LangVersion>
89
</PropertyGroup>
910

1011
<ItemGroup>

examples/pb-net-grpc/Server_FS/Server_FS.fsproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<GenerateDocumentationFile>false</GenerateDocumentationFile>
55
<TargetFramework>netcoreapp3.0</TargetFramework>
66
<SignAssembly>false</SignAssembly>
7+
<LangVersion>4.7</LangVersion>
78
</PropertyGroup>
89

910
<ItemGroup>

examples/pb-net-grpc/Shared_FS/Shared_FS.fsproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<GenerateDocumentationFile>false</GenerateDocumentationFile>
55
<TargetFramework>netcoreapp3.0</TargetFramework>
66
<SignAssembly>false</SignAssembly>
7+
<LangVersion>4.7</LangVersion>
78
</PropertyGroup>
89

910
<ItemGroup>

src/protobuf-net.Grpc/Internal/ContractOperation.cs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -316,12 +316,20 @@ where method.IsGenericMethodDefinition
316316
{(MethodType.Unary, ResultKind.Sync, VoidKind.Response), nameof(Reshape.UnarySyncVoid) },
317317
};
318318
#pragma warning restore CS0618
319-
private string? GetClientHelperName() => Context switch
320-
{
321-
ContextKind.CallContext or ContextKind.NoContext or ContextKind.CancellationToken => _clientResponseMap.TryGetValue((MethodType, Result, Void & VoidKind.Response), out var helper) ? helper : null,
322-
_ => null,
323-
};
324319

320+
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0066:Convert switch statement to expression", Justification = "Isn't actually C# 8.0 (but works on preview compiler)")]
321+
private string? GetClientHelperName()
322+
{
323+
switch (Context)
324+
{
325+
case ContextKind.CallContext:
326+
case ContextKind.NoContext:
327+
case ContextKind.CancellationToken:
328+
return _clientResponseMap.TryGetValue((MethodType, Result, Void & VoidKind.Response), out var helper) ? helper : null;
329+
default:
330+
return null;
331+
};
332+
}
325333

326334
internal bool IsSyncT()
327335
{

0 commit comments

Comments
 (0)