コード例 #1
0
 private ApplicationsSettings(ApplicationsSettings existing) : base(existing)
 {
     gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
     GetApplicationSettings              = existing.GetApplicationSettings;
     CreateApplicationSettings           = existing.CreateApplicationSettings;
     CreateApplicationOperationsSettings = existing.CreateApplicationOperationsSettings.Clone();
     UpdateApplicationSettings           = existing.UpdateApplicationSettings;
     UpdateApplicationOperationsSettings = existing.UpdateApplicationOperationsSettings.Clone();
     RepairApplicationSettings           = existing.RepairApplicationSettings;
     RepairApplicationOperationsSettings = existing.RepairApplicationOperationsSettings.Clone();
     OnCopy(existing);
 }
コード例 #2
0
        /// <summary>
        /// Creates a <see cref="ApplicationsClient"/> 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="ApplicationsSettings"/>.</param>
        /// <returns>The created <see cref="ApplicationsClient"/>.</returns>
        internal static ApplicationsClient Create(grpccore::CallInvoker callInvoker, ApplicationsSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            Applications.ApplicationsClient grpcClient = new Applications.ApplicationsClient(callInvoker);
            return(new ApplicationsClientImpl(grpcClient, settings));
        }
コード例 #3
0
        /// <summary>
        /// Constructs a client wrapper for the Applications service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="ApplicationsSettings"/> used within this client.</param>
        public ApplicationsClientImpl(Applications.ApplicationsClient grpcClient, ApplicationsSettings settings)
        {
            GrpcClient = grpcClient;
            ApplicationsSettings  effectiveSettings = settings ?? ApplicationsSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            CreateApplicationOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.CreateApplicationOperationsSettings);
            UpdateApplicationOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.UpdateApplicationOperationsSettings);
            RepairApplicationOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.RepairApplicationOperationsSettings);
            _callGetApplication = clientHelper.BuildApiCall <GetApplicationRequest, Application>(grpcClient.GetApplicationAsync, grpcClient.GetApplication, effectiveSettings.GetApplicationSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callGetApplication);
            Modify_GetApplicationApiCall(ref _callGetApplication);
            _callCreateApplication = clientHelper.BuildApiCall <CreateApplicationRequest, lro::Operation>(grpcClient.CreateApplicationAsync, grpcClient.CreateApplication, effectiveSettings.CreateApplicationSettings);
            Modify_ApiCall(ref _callCreateApplication);
            Modify_CreateApplicationApiCall(ref _callCreateApplication);
            _callUpdateApplication = clientHelper.BuildApiCall <UpdateApplicationRequest, lro::Operation>(grpcClient.UpdateApplicationAsync, grpcClient.UpdateApplication, effectiveSettings.UpdateApplicationSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callUpdateApplication);
            Modify_UpdateApplicationApiCall(ref _callUpdateApplication);
            _callRepairApplication = clientHelper.BuildApiCall <RepairApplicationRequest, lro::Operation>(grpcClient.RepairApplicationAsync, grpcClient.RepairApplication, effectiveSettings.RepairApplicationSettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callRepairApplication);
            Modify_RepairApplicationApiCall(ref _callRepairApplication);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
コード例 #4
0
 partial void OnConstruction(Applications.ApplicationsClient grpcClient, ApplicationsSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
コード例 #5
0
 partial void OnCopy(ApplicationsSettings existing);