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

            AnnotateVideoOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.AnnotateVideoOperationsSettings);
            _callAnnotateVideo            = clientHelper.BuildApiCall <AnnotateVideoRequest, lro::Operation>(grpcClient.AnnotateVideoAsync, grpcClient.AnnotateVideo, effectiveSettings.AnnotateVideoSettings);
            Modify_ApiCall(ref _callAnnotateVideo);
            Modify_AnnotateVideoApiCall(ref _callAnnotateVideo);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
 partial void OnConstruction(VideoIntelligenceService.VideoIntelligenceServiceClient grpcClient, VideoIntelligenceServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
Ejemplo n.º 4
0
 /// <summary>
 /// Creates a <see cref="VideoIntelligenceServiceClient"/> which uses the specified channel for remote operations.
 /// </summary>
 /// <param name="channel">The <see cref="grpccore::Channel"/> for remote operations. Must not be null.</param>
 /// <param name="settings">Optional <see cref="VideoIntelligenceServiceSettings"/>.</param>
 /// <returns>The created <see cref="VideoIntelligenceServiceClient"/>.</returns>
 public static VideoIntelligenceServiceClient Create(grpccore::Channel channel, VideoIntelligenceServiceSettings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(channel, nameof(channel));
     VideoIntelligenceService.VideoIntelligenceServiceClient grpcClient = new VideoIntelligenceService.VideoIntelligenceServiceClient(channel);
     return(new VideoIntelligenceServiceClientImpl(grpcClient, settings));
 }