コード例 #1
0
        /// <summary>
        /// Constructs a client wrapper for the Publisher service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="PublisherSettings"/> used within this client.</param>
        public PublisherClientImpl(Publisher.PublisherClient grpcClient, PublisherSettings settings)
        {
            GrpcClient = grpcClient;
            PublisherSettings     effectiveSettings = settings ?? PublisherSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callPublishChannelConnectionEvents = clientHelper.BuildApiCall <PublishChannelConnectionEventsRequest, PublishChannelConnectionEventsResponse>(grpcClient.PublishChannelConnectionEventsAsync, grpcClient.PublishChannelConnectionEvents, effectiveSettings.PublishChannelConnectionEventsSettings).WithGoogleRequestParam("channel_connection", request => request.ChannelConnection);
            Modify_ApiCall(ref _callPublishChannelConnectionEvents);
            Modify_PublishChannelConnectionEventsApiCall(ref _callPublishChannelConnectionEvents);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
コード例 #2
0
        /// <summary>
        /// Creates a <see cref="PublisherClient"/> 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="PublisherSettings"/>.</param>
        /// <returns>The created <see cref="PublisherClient"/>.</returns>
        internal static PublisherClient Create(grpccore::CallInvoker callInvoker, PublisherSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            Publisher.PublisherClient grpcClient = new Publisher.PublisherClient(callInvoker);
            return(new PublisherClientImpl(grpcClient, settings));
        }
コード例 #3
0
 partial void OnCopy(PublisherSettings existing);
コード例 #4
0
 private PublisherSettings(PublisherSettings existing) : base(existing)
 {
     gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
     PublishChannelConnectionEventsSettings = existing.PublishChannelConnectionEventsSettings;
     OnCopy(existing);
 }
コード例 #5
0
 partial void OnConstruction(Publisher.PublisherClient grpcClient, PublisherSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);