Пример #1
0
        /// <summary>
        /// Constructs a client wrapper for the FeedPlaceholderViewService service, with the specified gRPC client and
        /// settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">
        /// The base <see cref="FeedPlaceholderViewServiceSettings"/> used within this client.
        /// </param>
        public FeedPlaceholderViewServiceClientImpl(FeedPlaceholderViewService.FeedPlaceholderViewServiceClient grpcClient, FeedPlaceholderViewServiceSettings settings)
        {
            GrpcClient = grpcClient;
            FeedPlaceholderViewServiceSettings effectiveSettings = settings ?? FeedPlaceholderViewServiceSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetFeedPlaceholderView = clientHelper.BuildApiCall <GetFeedPlaceholderViewRequest, gagvr::FeedPlaceholderView>(grpcClient.GetFeedPlaceholderViewAsync, grpcClient.GetFeedPlaceholderView, effectiveSettings.GetFeedPlaceholderViewSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName);
            Modify_ApiCall(ref _callGetFeedPlaceholderView);
            Modify_GetFeedPlaceholderViewApiCall(ref _callGetFeedPlaceholderView);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Пример #2
0
        /// <summary>
        /// Constructs a client wrapper for the FeedPlaceholderViewService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="FeedPlaceholderViewServiceSettings"/> used within this client </param>
        public FeedPlaceholderViewServiceClientImpl(FeedPlaceholderViewService.FeedPlaceholderViewServiceClient grpcClient, FeedPlaceholderViewServiceSettings settings)
        {
            GrpcClient = grpcClient;
            FeedPlaceholderViewServiceSettings effectiveSettings = settings ?? FeedPlaceholderViewServiceSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetFeedPlaceholderView = clientHelper.BuildApiCall <GetFeedPlaceholderViewRequest, gagvr::FeedPlaceholderView>(
                GrpcClient.GetFeedPlaceholderViewAsync, GrpcClient.GetFeedPlaceholderView, effectiveSettings.GetFeedPlaceholderViewSettings)
                                          .WithCallSettingsOverlay(request => gaxgrpc::CallSettings.FromHeader("x-goog-request-params", $"resource_name={request.ResourceName}"));
            Modify_ApiCall(ref _callGetFeedPlaceholderView);
            Modify_GetFeedPlaceholderViewApiCall(ref _callGetFeedPlaceholderView);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }