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