diff options
author | 2018-11-08 11:17:22 +0100 | |
---|---|---|
committer | 2018-11-08 11:17:22 +0100 | |
commit | b187cfe460918cd7378da7be5c8211d682147b14 (patch) | |
tree | 364d8e895a19741275fc5f133006c9c7a28e2e50 /src/csharp/Grpc.Examples | |
parent | a50c61edc11568e5e9a38af105d53b802fb20ec9 (diff) |
regenerate protos
Diffstat (limited to 'src/csharp/Grpc.Examples')
-rw-r--r-- | src/csharp/Grpc.Examples/MathGrpc.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/csharp/Grpc.Examples/MathGrpc.cs b/src/csharp/Grpc.Examples/MathGrpc.cs index 9578bb4d81..ec2cfe8b28 100644 --- a/src/csharp/Grpc.Examples/MathGrpc.cs +++ b/src/csharp/Grpc.Examples/MathGrpc.cs @@ -287,6 +287,17 @@ namespace Math { .AddMethod(__Method_Sum, serviceImpl.Sum).Build(); } + /// <summary>Register service method implementations with a service binder. Useful when customizing the service binding logic.</summary> + /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param> + /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> + public static void BindService(grpc::ServiceBinderBase serviceBinder, MathBase serviceImpl) + { + serviceBinder.AddMethod(__Method_Div, serviceImpl.Div); + serviceBinder.AddMethod(__Method_DivMany, serviceImpl.DivMany); + serviceBinder.AddMethod(__Method_Fib, serviceImpl.Fib); + serviceBinder.AddMethod(__Method_Sum, serviceImpl.Sum); + } + } } #endregion |