aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Examples
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2015-07-14 19:29:35 -0700
committerGravatar Jan Tattermusch <jtattermusch@google.com>2015-07-15 11:36:53 -0700
commitb533281e8e4535498876d870414c5f58e5cd1cd7 (patch)
tree8951f1c4bd50a11452d25d85acd264d54498421b /src/csharp/Grpc.Examples
parente5c9b80566c3260035187b19e37c91f5cd3d4e2a (diff)
adjust C# generator to match the new API
Diffstat (limited to 'src/csharp/Grpc.Examples')
-rw-r--r--src/csharp/Grpc.Examples/MathGrpc.cs18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/csharp/Grpc.Examples/MathGrpc.cs b/src/csharp/Grpc.Examples/MathGrpc.cs
index bf820e2e3a..0bdc7668d1 100644
--- a/src/csharp/Grpc.Examples/MathGrpc.cs
+++ b/src/csharp/Grpc.Examples/MathGrpc.cs
@@ -41,7 +41,7 @@ namespace math {
__Marshaller_Num,
__Marshaller_Num);
- // client-side stub interface
+ // client interface
public interface IMathClient
{
global::math.DivReply Div(global::math.DivArgs request, CancellationToken token = default(CancellationToken));
@@ -61,12 +61,9 @@ namespace math {
}
// client stub
- public class MathClient : ClientBase<MathClient, StubConfiguration>, IMathClient
+ public class MathClient : ClientBase, IMathClient
{
- public MathClient(Channel channel) : this(channel, StubConfiguration.Default)
- {
- }
- public MathClient(Channel channel, StubConfiguration config) : base(channel, config)
+ public MathClient(Channel channel) : base(channel)
{
}
public global::math.DivReply Div(global::math.DivArgs request, CancellationToken token = default(CancellationToken))
@@ -106,17 +103,12 @@ namespace math {
.AddMethod(__Method_Sum, serviceImpl.Sum).Build();
}
- // creates a new client stub
- public static IMathClient NewStub(Channel channel)
+ // creates a new client
+ public static MathClient NewClient(Channel channel)
{
return new MathClient(channel);
}
- // creates a new client stub
- public static IMathClient NewStub(Channel channel, StubConfiguration config)
- {
- return new MathClient(channel, config);
- }
}
}
#endregion