Beispiel #1
0
 public override async Task ExecuteResultAsync(ActionContext context)
 {
     try
     {
         await base.ExecuteResultAsync(context);
     }
     finally
     {
         await _streamResult.DisposeAsync();
     }
 }
        public override async Task ExecuteResultAsync(ActionContext context)
        {
            try
            {
#if !NETSTANDARD2_0
                context.HttpContext.Features.Get <AspNetCore.Http.Features.IHttpResponseBodyFeature>()?.DisableBuffering();
#else
                context.HttpContext.Features.Get <AspNetCore.Http.Features.IHttpBufferingFeature>()?.DisableResponseBuffering();
#endif
                await base.ExecuteResultAsync(context);
            }
            finally
            {
                await _streamResult.DisposeAsync();
            }
        }