From 392d1e0cfe0c478dbf08cadc75618b2588dc028a Mon Sep 17 00:00:00 2001 From: Jan Tattermusch <jtattermusch@google.com> Date: Mon, 9 Feb 2015 11:13:51 -0800 Subject: [PATCH] addressed review comments --- src/csharp/GrpcCore/Utils/RecordingQueue.cs | 5 +++++ src/csharp/InteropClient/{InteropClient.cs => Client.cs} | 9 +++++---- src/csharp/InteropClient/InteropClient.csproj | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) rename src/csharp/InteropClient/{InteropClient.cs => Client.cs} (98%) diff --git a/src/csharp/GrpcCore/Utils/RecordingQueue.cs b/src/csharp/GrpcCore/Utils/RecordingQueue.cs index 8e2f8a496d..0726f00af7 100644 --- a/src/csharp/GrpcCore/Utils/RecordingQueue.cs +++ b/src/csharp/GrpcCore/Utils/RecordingQueue.cs @@ -5,6 +5,11 @@ using System.Collections.Concurrent; namespace Google.GRPC.Core.Utils { + /// <summary> + /// Observer that allows us to await incoming messages one-by-one. + /// The implementation is not ideal and class will be probably replaced + /// by something more versatile in the future. + /// </summary> public class RecordingQueue<T> : IObserver<T> { readonly BlockingCollection<T> queue = new BlockingCollection<T>(); diff --git a/src/csharp/InteropClient/InteropClient.cs b/src/csharp/InteropClient/Client.cs similarity index 98% rename from src/csharp/InteropClient/InteropClient.cs rename to src/csharp/InteropClient/Client.cs index 40c4781304..9f5815050e 100644 --- a/src/csharp/InteropClient/InteropClient.cs +++ b/src/csharp/InteropClient/Client.cs @@ -7,9 +7,9 @@ using Google.GRPC.Core.Utils; using Google.ProtocolBuffers; using grpc.testing; -namespace InteropClient +namespace Google.GRPC.Interop { - class InteropClient + class Client { private class ClientOptions { @@ -24,7 +24,8 @@ namespace InteropClient ClientOptions options; - private InteropClient(ClientOptions options) { + private Client(ClientOptions options) + { this.options = options; } @@ -53,7 +54,7 @@ namespace InteropClient Environment.Exit(1); } - var interopClient = new InteropClient(options); + var interopClient = new Client(options); interopClient.Run(); } diff --git a/src/csharp/InteropClient/InteropClient.csproj b/src/csharp/InteropClient/InteropClient.csproj index ecc1c10875..b8e099d785 100644 --- a/src/csharp/InteropClient/InteropClient.csproj +++ b/src/csharp/InteropClient/InteropClient.csproj @@ -9,7 +9,7 @@ <OutputType>Exe</OutputType> <RootNamespace>InteropClient</RootNamespace> <AssemblyName>InteropClient</AssemblyName> - <StartupObject>InteropClient.InteropClient</StartupObject> + <StartupObject>Google.GRPC.Interop.Client</StartupObject> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> @@ -43,7 +43,7 @@ </ItemGroup> <ItemGroup> <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="InteropClient.cs" /> + <Compile Include="Client.cs" /> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <ItemGroup> -- GitLab