#region Copyright notice and license // Copyright 2018 gRPC authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #endregion using System; using System.Reflection; using System.Threading.Tasks; using Grpc.Core.Internal; namespace Grpc.Core.Interceptors { /// /// Carries along the context associated with intercepted invocations on the client side. /// public struct ClientInterceptorContext where TRequest : class where TResponse : class { /// /// Creates a new instance of /// with the specified method, host, and call options. /// /// A object representing the method to be invoked. /// The host to dispatch the current call to. /// A instance containing the call options of the current call. public ClientInterceptorContext(Method method, string host, CallOptions options) { Method = method; Host = host; Options = options; } /// /// Gets the instance /// representing the method to be invoked. /// public Method Method { get; } /// /// Gets the host that the currect invocation will be dispatched to. /// public string Host { get; } /// /// Gets the structure representing the /// call options associated with the current invocation. /// public CallOptions Options { get; } } }