/// <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(TransactionServiceBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_GetAllTransactions, serviceImpl.GetAllTransactions) .AddMethod(__Method_NewTopUp, serviceImpl.NewTopUp) .AddMethod(__Method_NewTransfer, serviceImpl.NewTransfer) .AddMethod(__Method_NewPurchase, serviceImpl.NewPurchase) .AddMethod(__Method_ViewTransaction, serviceImpl.ViewTransaction).Build()); }
/// <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, TransactionServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_GetTransactions, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod <global::Com.DigitalAsset.Ledger.Api.V1.GetTransactionsRequest, global::Com.DigitalAsset.Ledger.Api.V1.GetTransactionsResponse>(serviceImpl.GetTransactions)); serviceBinder.AddMethod(__Method_GetTransactionTrees, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod <global::Com.DigitalAsset.Ledger.Api.V1.GetTransactionsRequest, global::Com.DigitalAsset.Ledger.Api.V1.GetTransactionTreesResponse>(serviceImpl.GetTransactionTrees)); serviceBinder.AddMethod(__Method_GetTransactionByEventId, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Com.DigitalAsset.Ledger.Api.V1.GetTransactionByEventIdRequest, global::Com.DigitalAsset.Ledger.Api.V1.GetTransactionResponse>(serviceImpl.GetTransactionByEventId)); serviceBinder.AddMethod(__Method_GetTransactionById, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Com.DigitalAsset.Ledger.Api.V1.GetTransactionByIdRequest, global::Com.DigitalAsset.Ledger.Api.V1.GetTransactionResponse>(serviceImpl.GetTransactionById)); serviceBinder.AddMethod(__Method_GetFlatTransactionByEventId, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Com.DigitalAsset.Ledger.Api.V1.GetTransactionByEventIdRequest, global::Com.DigitalAsset.Ledger.Api.V1.GetFlatTransactionResponse>(serviceImpl.GetFlatTransactionByEventId)); serviceBinder.AddMethod(__Method_GetFlatTransactionById, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Com.DigitalAsset.Ledger.Api.V1.GetTransactionByIdRequest, global::Com.DigitalAsset.Ledger.Api.V1.GetFlatTransactionResponse>(serviceImpl.GetFlatTransactionById)); serviceBinder.AddMethod(__Method_GetLedgerEnd, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Com.DigitalAsset.Ledger.Api.V1.GetLedgerEndRequest, global::Com.DigitalAsset.Ledger.Api.V1.GetLedgerEndResponse>(serviceImpl.GetLedgerEnd)); }
/// <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(TransactionServiceBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_GetTransactions, serviceImpl.GetTransactions) .AddMethod(__Method_GetTransactionTrees, serviceImpl.GetTransactionTrees) .AddMethod(__Method_GetTransactionByEventId, serviceImpl.GetTransactionByEventId) .AddMethod(__Method_GetTransactionById, serviceImpl.GetTransactionById) .AddMethod(__Method_GetFlatTransactionByEventId, serviceImpl.GetFlatTransactionByEventId) .AddMethod(__Method_GetFlatTransactionById, serviceImpl.GetFlatTransactionById) .AddMethod(__Method_GetLedgerEnd, serviceImpl.GetLedgerEnd).Build()); }