Exemplo n.º 1
0
        public async Task Write(IDictionary <string, object> environment, OutputRenderingResult result)
        {
            if (result == null)
            {
                return;
            }

            var response = environment.GetResponse();

            response.Headers.ContentType = result.ContentType;

            using (result.Body)
                await response.Write(result.Body).ConfigureAwait(false);
        }
Exemplo n.º 2
0
 public static void SetOutputResult(this IDictionary <string, object> environment, OutputRenderingResult result)
 {
     environment[OutputConstants.OutputResult] = result;
 }