Esempio n. 1
0
        /// <summary>
        /// Invokes AsyncServerStreamingCall 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>
        /// <param name="request"></param>
        /// <returns></returns>
        public static AsyncServerStreamingCall <TResponse> StructAsyncServerStreamingCall <TRequest, TResponse>(this CallInvoker callInvoker, Method <TRequest, TResponse> method, string host, CallOptions options, TRequest request)
        {
            AsyncServerStreamingCall <byte[]> call = callInvoker.AsyncServerStreamingCall(s_StructMethodCache.GetMethod(method), host, options, method.RequestMarshaller.Serializer(request));

            return(call.ConvertResponse(method.ResponseMarshaller.Deserializer));
        }