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

            _callListImageVersions = clientHelper.BuildApiCall <ListImageVersionsRequest, ListImageVersionsResponse>(grpcClient.ListImageVersionsAsync, grpcClient.ListImageVersions, effectiveSettings.ListImageVersionsSettings).WithGoogleRequestParam("parent", request => request.Parent);
            Modify_ApiCall(ref _callListImageVersions);
            Modify_ListImageVersionsApiCall(ref _callListImageVersions);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Пример #2
0
 partial void OnCopy(ImageVersionsSettings existing);
Пример #3
0
 private ImageVersionsSettings(ImageVersionsSettings existing) : base(existing)
 {
     gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
     ListImageVersionsSettings = existing.ListImageVersionsSettings;
     OnCopy(existing);
 }
Пример #4
0
 partial void OnConstruction(ImageVersions.ImageVersionsClient grpcClient, ImageVersionsSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
Пример #5
0
        /// <summary>
        /// Creates a <see cref="ImageVersionsClient"/> 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="ImageVersionsSettings"/>.</param>
        /// <returns>The created <see cref="ImageVersionsClient"/>.</returns>
        internal static ImageVersionsClient Create(grpccore::CallInvoker callInvoker, ImageVersionsSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            ImageVersions.ImageVersionsClient grpcClient = new ImageVersions.ImageVersionsClient(callInvoker);
            return(new ImageVersionsClientImpl(grpcClient, settings));
        }