コード例 #1
0
        /// <summary>
        /// Creates a <see cref="LabelServiceClient"/> 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="LabelServiceSettings"/>.</param>
        /// <returns>The created <see cref="LabelServiceClient"/>.</returns>
        internal static LabelServiceClient Create(grpccore::CallInvoker callInvoker, LabelServiceSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            LabelService.LabelServiceClient grpcClient = new LabelService.LabelServiceClient(callInvoker);
            return(new LabelServiceClientImpl(grpcClient, settings));
        }