Exemplo n.º 1
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>
 public static PaymentsAccountServiceClient Create(grpccore::CallInvoker callInvoker, PaymentsAccountServiceSettings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
     grpccore::Interceptors.Interceptor interceptor = settings?.Interceptor;
     if (interceptor != null)
     {
         callInvoker = grpccore::Interceptors.CallInvokerExtensions.Intercept(callInvoker, interceptor);
     }
     PaymentsAccountService.PaymentsAccountServiceClient grpcClient = new PaymentsAccountService.PaymentsAccountServiceClient(callInvoker);
     return(new PaymentsAccountServiceClientImpl(grpcClient, settings));
 }
Exemplo n.º 2
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);
            Modify_ApiCall(ref _callListPaymentsAccounts);
            Modify_ListPaymentsAccountsApiCall(ref _callListPaymentsAccounts);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemplo n.º 3
0
 partial void OnConstruction(PaymentsAccountService.PaymentsAccountServiceClient grpcClient, PaymentsAccountServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);