Пример #1
0
 /// <summary>Creates service definition that can be registered with a server</summary>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static grpc::ServerServiceDefinition BindService(CalculatorServiceBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_Sum, serviceImpl.Sum)
            .AddMethod(__Method_ComputeAverage, serviceImpl.ComputeAverage)
            .AddMethod(__Method_FindMax, serviceImpl.FindMax).Build());
 }
Пример #2
0
 /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
 /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</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, CalculatorServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_Add, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::SimpleCalc.SharedLib.Generated.CalculatorRequest, global::SimpleCalc.SharedLib.Generated.CalculatorReply>(serviceImpl.Add));
     serviceBinder.AddMethod(__Method_Subtract, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::SimpleCalc.SharedLib.Generated.CalculatorRequest, global::SimpleCalc.SharedLib.Generated.CalculatorReply>(serviceImpl.Subtract));
     serviceBinder.AddMethod(__Method_Multiply, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::SimpleCalc.SharedLib.Generated.CalculatorRequest, global::SimpleCalc.SharedLib.Generated.CalculatorReply>(serviceImpl.Multiply));
     serviceBinder.AddMethod(__Method_Divide, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::SimpleCalc.SharedLib.Generated.CalculatorRequest, global::SimpleCalc.SharedLib.Generated.CalculatorReply>(serviceImpl.Divide));
 }
Пример #3
0
 /// <summary>Creates service definition that can be registered with a server</summary>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static grpc::ServerServiceDefinition BindService(CalculatorServiceBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_Sum, serviceImpl.Sum)
            .AddMethod(__Method_Mul, serviceImpl.Mul)
            .AddMethod(__Method_Prime, serviceImpl.Prime).Build());
 }
Пример #4
0
 /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
 /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</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, CalculatorServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_Calc, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Calc.CalculatorRequest, global::Calc.CalculatorResponse>(serviceImpl.Calc));
     serviceBinder.AddMethod(__Method_PrimeNumber, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod <global::Calc.PrimeNumberRequest, global::Calc.PrimeNumberResponse>(serviceImpl.PrimeNumber));
     serviceBinder.AddMethod(__Method_ComputeAvg, serviceImpl == null ? null : new grpc::ClientStreamingServerMethod <global::Calc.ComputeAvgRequest, global::Calc.ComputeAvgResponse>(serviceImpl.ComputeAvg));
     serviceBinder.AddMethod(__Method_FindMaxNumber, serviceImpl == null ? null : new grpc::DuplexStreamingServerMethod <global::Calc.FindMaxNumberRequest, global::Calc.FindMaxNumberResponse>(serviceImpl.FindMaxNumber));
 }
Пример #5
0
 /// <summary>Creates service definition that can be registered with a server</summary>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static grpc::ServerServiceDefinition BindService(CalculatorServiceBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_Add, serviceImpl.Add)
            .AddMethod(__Method_Subtract, serviceImpl.Subtract)
            .AddMethod(__Method_Multiply, serviceImpl.Multiply)
            .AddMethod(__Method_Divide, serviceImpl.Divide).Build());
 }
Пример #6
0
 /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
 /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</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, CalculatorServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_Add, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Calculator.AddRequest, global::Calculator.AddResponse>(serviceImpl.Add));
     serviceBinder.AddMethod(__Method_PrimeNoDecomp, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod <global::Calculator.PrimeNoDecompRequest, global::Calculator.PrimeNoDecompResponse>(serviceImpl.PrimeNoDecomp));
     serviceBinder.AddMethod(__Method_ComputeAverage, serviceImpl == null ? null : new grpc::ClientStreamingServerMethod <global::Calculator.AverageRequest, global::Calculator.AverageResponse>(serviceImpl.ComputeAverage));
     serviceBinder.AddMethod(__Method_FindMaximum, serviceImpl == null ? null : new grpc::DuplexStreamingServerMethod <global::Calculator.FindMaxRequest, global::Calculator.FindMaxResponse>(serviceImpl.FindMaximum));
     serviceBinder.AddMethod(__Method_Sqrt, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Calculator.SqrtRequest, global::Calculator.SqrtResponse>(serviceImpl.Sqrt));
 }
Пример #7
0
 /// <summary>Creates service definition that can be registered with a server</summary>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static grpc::ServerServiceDefinition BindService(CalculatorServiceBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_Calc, serviceImpl.Calc)
            .AddMethod(__Method_PrimeNumber, serviceImpl.PrimeNumber)
            .AddMethod(__Method_ComputeAvg, serviceImpl.ComputeAvg)
            .AddMethod(__Method_FindMaxNumber, serviceImpl.FindMaxNumber).Build());
 }
Пример #8
0
 /// <summary>Creates service definition that can be registered with a server</summary>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static grpc::ServerServiceDefinition BindService(CalculatorServiceBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_Add, serviceImpl.Add)
            .AddMethod(__Method_PrimeNoDecomp, serviceImpl.PrimeNoDecomp)
            .AddMethod(__Method_ComputeAverage, serviceImpl.ComputeAverage)
            .AddMethod(__Method_FindMaximum, serviceImpl.FindMaximum)
            .AddMethod(__Method_Sqrt, serviceImpl.Sqrt).Build());
 }
Пример #9
0
 /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
 /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</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, CalculatorServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_Sum, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Calculator.SumRequest, global::Calculator.SumResponse>(serviceImpl.Sum));
     serviceBinder.AddMethod(__Method_ComputeAverage, serviceImpl == null ? null : new grpc::ClientStreamingServerMethod <global::Calculator.ComputeAverageRequest, global::Calculator.ComputeAverageResponse>(serviceImpl.ComputeAverage));
     serviceBinder.AddMethod(__Method_FindMax, serviceImpl == null ? null : new grpc::DuplexStreamingServerMethod <global::Calculator.FindMaxRequest, global::Calculator.FindMaxResponse>(serviceImpl.FindMax));
 }
Пример #10
0
 /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
 /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</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, CalculatorServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_Sum, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Calculator.CalRequest, global::Calculator.CalResponse>(serviceImpl.Sum));
     serviceBinder.AddMethod(__Method_Mul, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Calculator.CalRequest, global::Calculator.CalResponse>(serviceImpl.Mul));
     serviceBinder.AddMethod(__Method_Prime, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod <global::Calculator.PrimeRequest, global::Calculator.PrimeResponse>(serviceImpl.Prime));
 }
Пример #11
0
 /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
 /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</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, CalculatorServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_Calculate, serviceImpl == null ? null : new grpc::DuplexStreamingServerMethod <global::Generated.OperationRequest, global::Generated.OperationResponse>(serviceImpl.Calculate));
 }
Пример #12
0
 /// <summary>Creates service definition that can be registered with a server</summary>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static grpc::ServerServiceDefinition BindService(CalculatorServiceBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_Calculate, serviceImpl.Calculate).Build());
 }
Пример #13
0
 /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
 /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</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, CalculatorServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_Sum, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Calculator.SumRequest, global::Calculator.SumResponse>(serviceImpl.Sum));
 }