Exemple #1
0
        /// <summary>
        /// Invokes AsyncDuplexStreamingCall without type restrictions.
        /// </summary>
        /// <typeparam name="TRequest">The type of the request.</typeparam>
        /// <typeparam name="TResponse">The type of the response.</typeparam>
        /// <param name="callInvoker"></param>
        /// <param name="method"></param>
        /// <param name="host"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        public static AsyncDuplexStreamingCall <TRequest, TResponse> StructAsyncDuplexStreamingCall <TRequest, TResponse>(this CallInvoker callInvoker, Method <TRequest, TResponse> method, string host, CallOptions options)
        {
            AsyncDuplexStreamingCall <byte[], byte[]> call = callInvoker.AsyncDuplexStreamingCall(s_StructMethodCache.GetMethod(method), host, options);

            return(call.ConvertRequestResponse(method.RequestMarshaller.Serializer, method.ResponseMarshaller.Deserializer));
        }