Update async Dispose and methods references (#22407)

* Update async Dispose and methods references

- `Dispose` can be changed to  `DisposeAsync`
- The methods in the following code snippet are not available, it causes duplicate references

```
        /// <summary>
        /// <see cref="HelperResult.WriteTo(TextWriter)"/> is invoked
        /// </summary>
        /// <param name="result">The <see cref="HelperResult"/> to invoke</param>
        protected void Write(HelperResult result)
        {
            Write(result);
        }

```

* Update BaseView.cs
This commit is contained in:
Huei Feng 2020-06-03 23:43:08 +08:00 committed by GitHub
parent 381ac51af6
commit 77ef004db4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -69,7 +69,7 @@ namespace Microsoft.Extensions.RazorViews
Output = new StreamWriter(buffer, UTF8NoBOM, 4096, leaveOpen: true);
await ExecuteAsync();
await Output.FlushAsync();
Output.Dispose();
await Output.DisposeAsync();
buffer.Seek(0, SeekOrigin.Begin);
await buffer.CopyToAsync(stream);
}
@ -87,7 +87,7 @@ namespace Microsoft.Extensions.RazorViews
Output = new StreamWriter(buffer, UTF8NoBOM, 4096, leaveOpen: true);
await ExecuteAsync();
await Output.FlushAsync();
Output.Dispose();
await Output.DisposeAsync();
buffer.Seek(0, SeekOrigin.Begin);
await buffer.CopyToAsync(Response.Body);
}
@ -244,13 +244,13 @@ namespace Microsoft.Extensions.RazorViews
WriteLiteral(trailer);
}
/// <summary>
/// <summary>
/// <see cref="HelperResult.WriteTo(TextWriter)"/> is invoked
/// </summary>
/// <param name="result">The <see cref="HelperResult"/> to invoke</param>
protected void Write(HelperResult result)
{
Write(result);
result.WriteTo(Output);
}
/// <summary>