Пример #1
0
        /// <summary>
        /// Creates a <see cref="AccountLinkServiceClient"/> 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="AccountLinkServiceSettings"/>.</param>
        /// <returns>The created <see cref="AccountLinkServiceClient"/>.</returns>
        internal static AccountLinkServiceClient Create(grpccore::CallInvoker callInvoker, AccountLinkServiceSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            AccountLinkService.AccountLinkServiceClient grpcClient = new AccountLinkService.AccountLinkServiceClient(callInvoker);
            return(new AccountLinkServiceClientImpl(grpcClient, settings));
        }
Пример #2
0
        /// <summary>
        /// Constructs a client wrapper for the AccountLinkService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="AccountLinkServiceSettings"/> used within this client.</param>
        public AccountLinkServiceClientImpl(AccountLinkService.AccountLinkServiceClient grpcClient, AccountLinkServiceSettings settings)
        {
            GrpcClient = grpcClient;
            AccountLinkServiceSettings effectiveSettings = settings ?? AccountLinkServiceSettings.GetDefault();
            gaxgrpc::ClientHelper      clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetAccountLink = clientHelper.BuildApiCall <GetAccountLinkRequest, gagvr::AccountLink>(grpcClient.GetAccountLinkAsync, grpcClient.GetAccountLink, effectiveSettings.GetAccountLinkSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName);
            Modify_ApiCall(ref _callGetAccountLink);
            Modify_GetAccountLinkApiCall(ref _callGetAccountLink);
            _callCreateAccountLink = clientHelper.BuildApiCall <CreateAccountLinkRequest, CreateAccountLinkResponse>(grpcClient.CreateAccountLinkAsync, grpcClient.CreateAccountLink, effectiveSettings.CreateAccountLinkSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId);
            Modify_ApiCall(ref _callCreateAccountLink);
            Modify_CreateAccountLinkApiCall(ref _callCreateAccountLink);
            _callMutateAccountLink = clientHelper.BuildApiCall <MutateAccountLinkRequest, MutateAccountLinkResponse>(grpcClient.MutateAccountLinkAsync, grpcClient.MutateAccountLink, effectiveSettings.MutateAccountLinkSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId);
            Modify_ApiCall(ref _callMutateAccountLink);
            Modify_MutateAccountLinkApiCall(ref _callMutateAccountLink);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Пример #3
0
 partial void OnConstruction(AccountLinkService.AccountLinkServiceClient grpcClient, AccountLinkServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);