コード例 #1
0
        /// <summary>
        /// Constructs a client wrapper for the PaymentsAccountService service, with the specified gRPC client and
        /// settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">
        /// The base <see cref="PaymentsAccountServiceSettings"/> used within this client.
        /// </param>
        public PaymentsAccountServiceClientImpl(PaymentsAccountService.PaymentsAccountServiceClient grpcClient, PaymentsAccountServiceSettings settings)
        {
            GrpcClient = grpcClient;
            PaymentsAccountServiceSettings effectiveSettings = settings ?? PaymentsAccountServiceSettings.GetDefault();
            gaxgrpc::ClientHelper          clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callListPaymentsAccounts = clientHelper.BuildApiCall <ListPaymentsAccountsRequest, ListPaymentsAccountsResponse>(grpcClient.ListPaymentsAccountsAsync, grpcClient.ListPaymentsAccounts, effectiveSettings.ListPaymentsAccountsSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId);
            Modify_ApiCall(ref _callListPaymentsAccounts);
            Modify_ListPaymentsAccountsApiCall(ref _callListPaymentsAccounts);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
コード例 #2
0
        /// <summary>
        /// Creates a <see cref="PaymentsAccountServiceClient"/> which uses the specified call invoker for remote
        /// operations.
        /// </summary>
        /// <param name="callInvoker">
        /// The <see cref="grpccore::CallInvoker"/> for remote operations. Must not be null.
        /// </param>
        /// <param name="settings">Optional <see cref="PaymentsAccountServiceSettings"/>.</param>
        /// <returns>The created <see cref="PaymentsAccountServiceClient"/>.</returns>
        internal static PaymentsAccountServiceClient Create(grpccore::CallInvoker callInvoker, PaymentsAccountServiceSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            PaymentsAccountService.PaymentsAccountServiceClient grpcClient = new PaymentsAccountService.PaymentsAccountServiceClient(callInvoker);
            return(new PaymentsAccountServiceClientImpl(grpcClient, settings));
        }
コード例 #3
0
 partial void OnConstruction(PaymentsAccountService.PaymentsAccountServiceClient grpcClient, PaymentsAccountServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);