Example #1
0
        /// <summary>
        /// Constructs a client wrapper for the WebpageViewService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="WebpageViewServiceSettings"/> used within this client.</param>
        public WebpageViewServiceClientImpl(WebpageViewService.WebpageViewServiceClient grpcClient, WebpageViewServiceSettings settings)
        {
            GrpcClient = grpcClient;
            WebpageViewServiceSettings effectiveSettings = settings ?? WebpageViewServiceSettings.GetDefault();
            gaxgrpc::ClientHelper      clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetWebpageView = clientHelper.BuildApiCall <GetWebpageViewRequest, gagvr::WebpageView>(grpcClient.GetWebpageViewAsync, grpcClient.GetWebpageView, effectiveSettings.GetWebpageViewSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName);
            Modify_ApiCall(ref _callGetWebpageView);
            Modify_GetWebpageViewApiCall(ref _callGetWebpageView);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Example #2
0
        /// <summary>
        /// Creates a <see cref="WebpageViewServiceClient"/> 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="WebpageViewServiceSettings"/>.</param>
        /// <returns>The created <see cref="WebpageViewServiceClient"/>.</returns>
        internal static WebpageViewServiceClient Create(grpccore::CallInvoker callInvoker, WebpageViewServiceSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            WebpageViewService.WebpageViewServiceClient grpcClient = new WebpageViewService.WebpageViewServiceClient(callInvoker);
            return(new WebpageViewServiceClientImpl(grpcClient, settings));
        }
Example #3
0
 partial void OnConstruction(WebpageViewService.WebpageViewServiceClient grpcClient, WebpageViewServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);