コード例 #1
0
 /// <summary>
 /// Creates a <see cref="CampaignSharedSetServiceClient"/> 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="CampaignSharedSetServiceSettings"/>.</param>
 /// <returns>The created <see cref="CampaignSharedSetServiceClient"/>.</returns>
 public static CampaignSharedSetServiceClient Create(grpccore::CallInvoker callInvoker, CampaignSharedSetServiceSettings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
     grpccore::Interceptors.Interceptor interceptor = settings?.Interceptor;
     if (interceptor != null)
     {
         callInvoker = grpccore::Interceptors.CallInvokerExtensions.Intercept(callInvoker, interceptor);
     }
     CampaignSharedSetService.CampaignSharedSetServiceClient grpcClient = new CampaignSharedSetService.CampaignSharedSetServiceClient(callInvoker);
     return(new CampaignSharedSetServiceClientImpl(grpcClient, settings));
 }
コード例 #2
0
        /// <summary>
        /// Constructs a client wrapper for the CampaignSharedSetService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="CampaignSharedSetServiceSettings"/> used within this client </param>
        public CampaignSharedSetServiceClientImpl(CampaignSharedSetService.CampaignSharedSetServiceClient grpcClient, CampaignSharedSetServiceSettings settings)
        {
            GrpcClient = grpcClient;
            CampaignSharedSetServiceSettings effectiveSettings = settings ?? CampaignSharedSetServiceSettings.GetDefault();
            gaxgrpc::ClientHelper            clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetCampaignSharedSet = clientHelper.BuildApiCall <GetCampaignSharedSetRequest, gagvr::CampaignSharedSet>(
                GrpcClient.GetCampaignSharedSetAsync, GrpcClient.GetCampaignSharedSet, effectiveSettings.GetCampaignSharedSetSettings);
            _callMutateCampaignSharedSets = clientHelper.BuildApiCall <MutateCampaignSharedSetsRequest, MutateCampaignSharedSetsResponse>(
                GrpcClient.MutateCampaignSharedSetsAsync, GrpcClient.MutateCampaignSharedSets, effectiveSettings.MutateCampaignSharedSetsSettings);
            Modify_ApiCall(ref _callGetCampaignSharedSet);
            Modify_GetCampaignSharedSetApiCall(ref _callGetCampaignSharedSet);
            Modify_ApiCall(ref _callMutateCampaignSharedSets);
            Modify_MutateCampaignSharedSetsApiCall(ref _callMutateCampaignSharedSets);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
コード例 #3
0
 partial void OnConstruction(CampaignSharedSetService.CampaignSharedSetServiceClient grpcClient, CampaignSharedSetServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);