/// <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, CommandServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_SubmitAndWait, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Com.Daml.Ledger.Api.V1.SubmitAndWaitRequest, global::Google.Protobuf.WellKnownTypes.Empty>(serviceImpl.SubmitAndWait));
     serviceBinder.AddMethod(__Method_SubmitAndWaitForTransactionId, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Com.Daml.Ledger.Api.V1.SubmitAndWaitRequest, global::Com.Daml.Ledger.Api.V1.SubmitAndWaitForTransactionIdResponse>(serviceImpl.SubmitAndWaitForTransactionId));
     serviceBinder.AddMethod(__Method_SubmitAndWaitForTransaction, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Com.Daml.Ledger.Api.V1.SubmitAndWaitRequest, global::Com.Daml.Ledger.Api.V1.SubmitAndWaitForTransactionResponse>(serviceImpl.SubmitAndWaitForTransaction));
     serviceBinder.AddMethod(__Method_SubmitAndWaitForTransactionTree, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Com.Daml.Ledger.Api.V1.SubmitAndWaitRequest, global::Com.Daml.Ledger.Api.V1.SubmitAndWaitForTransactionTreeResponse>(serviceImpl.SubmitAndWaitForTransactionTree));
 }
Example #2
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(CommandServiceBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_Start, serviceImpl.Start)
            .AddMethod(__Method_Stop, serviceImpl.Stop)
            .AddMethod(__Method_Restart, serviceImpl.Restart).Build());
 }
 /// <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(CommandServiceBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_SubmitAndWait, serviceImpl.SubmitAndWait)
            .AddMethod(__Method_SubmitAndWaitForTransactionId, serviceImpl.SubmitAndWaitForTransactionId)
            .AddMethod(__Method_SubmitAndWaitForTransaction, serviceImpl.SubmitAndWaitForTransaction)
            .AddMethod(__Method_SubmitAndWaitForTransactionTree, serviceImpl.SubmitAndWaitForTransactionTree).Build());
 }
Example #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, CommandServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_Start, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::QuoteResearch.Service.Share.Type.EmptyRequest, global::QuoteResearch.Service.CommandService.CommandServiceResponse>(serviceImpl.Start));
     serviceBinder.AddMethod(__Method_Stop, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::QuoteResearch.Service.Share.Type.EmptyRequest, global::QuoteResearch.Service.CommandService.CommandServiceResponse>(serviceImpl.Stop));
     serviceBinder.AddMethod(__Method_Restart, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::QuoteResearch.Service.Share.Type.EmptyRequest, global::QuoteResearch.Service.CommandService.CommandServiceResponse>(serviceImpl.Restart));
 }