Skip to content

Commit

Permalink
library updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mgravell committed Jan 25, 2021
1 parent 327829f commit c95a139
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@

<ExampleRefs>local</ExampleRefs> <!-- local or nuget-->
<PBGRPCLibVersion>1.0.110</PBGRPCLibVersion>
<GrpcDotNetVersion>2.33.1</GrpcDotNetVersion>
<GrpcDotNetVersion>2.34.0</GrpcDotNetVersion>
<GoogleProtobufVersion>3.14.0</GoogleProtobufVersion>
<GrpcVersion>2.33.1</GrpcVersion>
<GrpcVersion>2.34.0</GrpcVersion>

<ProtoBufNet2Version>2.4.6</ProtoBufNet2Version>
<ProtoBufNet3Version>3.0.62</ProtoBufNet3Version>
<ProtoBufNet3Version>3.0.73</ProtoBufNet3Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release' or '$(Configuration)'=='VS'">
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<ItemGroup>
<PackageReference Include="System.ServiceModel.Primitives" Version="4.7.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.1.1" />
<PackageReference Include="protobuf-net" Version="3.0.29" />
<PackageReference Include="protobuf-net" Version="3.0.73" />
<PackageReference Include="protobuf-net.Grpc" Version="1.0.123" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.33.1" />
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.34.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Grpc.AspNetCore" Version="2.31.0" />
<PackageReference Include="Grpc.AspNetCore" Version="2.34.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Grpc.Net.Client" Version="2.30.0" />
<PackageReference Include="Grpc.Net.Client" Version="2.34.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="System.ServiceModel.Primitives" Version="4.8.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0" />
<PackageReference Include="protobuf-net" Version="3.0.29" />
<PackageReference Include="protobuf-net" Version="3.0.73" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Grpc.AspNetCore" Version="2.30.0" />
<PackageReference Include="Grpc.AspNetCore" Version="2.34.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.30.0" />
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.34.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Grpc.AspNetCore" Version="2.30.0" />
<PackageReference Include="Grpc.AspNetCore" Version="2.34.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.7" />
</ItemGroup>

Expand Down
8 changes: 4 additions & 4 deletions src/protobuf-net.Grpc/ChannelAsyncEnumerableExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public static async IAsyncEnumerable<T> AsAsyncEnumerable<T>(this ChannelReader<
{
while (await reader.WaitToReadAsync(cancellationToken).ConfigureAwait(false))
{
while (reader.TryRead(out T item))
while (reader.TryRead(out T? item))
{
yield return item;
yield return item!;
}
}
}
Expand Down Expand Up @@ -79,9 +79,9 @@ static void TryCompleteWriter(object? state)
{
while (await channel.Reader.WaitToReadAsync(cancellationToken).ConfigureAwait(false))
{
while (channel.Reader.TryRead(out T item))
while (channel.Reader.TryRead(out T? item))
{
yield return item;
yield return item!;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/protobuf-net.Grpc/Configuration/ServiceBinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class ServiceBinder
/// </summary>
protected ServiceBinder() { }

private Dictionary<Type, InterfaceMapping> _map = new Dictionary<Type, InterfaceMapping>();
private readonly Dictionary<Type, InterfaceMapping> _map = new Dictionary<Type, InterfaceMapping>();
private InterfaceMapping GetMap(Type contractType, Type serviceType)
{
if (!_map.TryGetValue(contractType, out var interfaceMapping))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace protobuf_net.Grpc.Reflection.Test

public class ReflectionServiceTests
{
private static Lazy<MethodInfo> AddImportMethod = new Lazy<MethodInfo>(() => typeof(FileDescriptorProto).GetMethod("AddImport", BindingFlags.NonPublic | BindingFlags.Instance));
private static readonly Lazy<MethodInfo> AddImportMethod = new Lazy<MethodInfo>(() => typeof(FileDescriptorProto).GetMethod("AddImport", BindingFlags.NonPublic | BindingFlags.Instance)!);

[Theory]
[MemberData(nameof(Dependencies))]
Expand All @@ -42,7 +42,7 @@ public async Task ShouldIncludeDependenciesInCorrectOrder(Type service, string s
{
// Use reflection.
var addImportMethod = AddImportMethod.Value;
addImportMethod.Invoke(fileDescriptor, new object[] {dependency, true, default});
addImportMethod.Invoke(fileDescriptor, new object?[] {dependency, true, default});
}

fileDescriptorSet.Files.Add(fileDescriptor);
Expand Down

0 comments on commit c95a139

Please sign in to comment.