/// <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, PartyManagementServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_GetParticipantId, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Com.Daml.Ledger.Api.V1.Admin.GetParticipantIdRequest, global::Com.Daml.Ledger.Api.V1.Admin.GetParticipantIdResponse>(serviceImpl.GetParticipantId));
     serviceBinder.AddMethod(__Method_GetParties, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Com.Daml.Ledger.Api.V1.Admin.GetPartiesRequest, global::Com.Daml.Ledger.Api.V1.Admin.GetPartiesResponse>(serviceImpl.GetParties));
     serviceBinder.AddMethod(__Method_ListKnownParties, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Com.Daml.Ledger.Api.V1.Admin.ListKnownPartiesRequest, global::Com.Daml.Ledger.Api.V1.Admin.ListKnownPartiesResponse>(serviceImpl.ListKnownParties));
     serviceBinder.AddMethod(__Method_AllocateParty, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Com.Daml.Ledger.Api.V1.Admin.AllocatePartyRequest, global::Com.Daml.Ledger.Api.V1.Admin.AllocatePartyResponse>(serviceImpl.AllocateParty));
 }
Пример #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(PartyManagementServiceBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_GetParticipantId, serviceImpl.GetParticipantId)
            .AddMethod(__Method_ListKnownParties, serviceImpl.ListKnownParties)
            .AddMethod(__Method_AllocateParty, serviceImpl.AllocateParty).Build());
 }