Inline
This commit is contained in:
parent
337bc462de
commit
e174d277bd
|
|
@ -5,6 +5,7 @@ using System;
|
||||||
using System.Buffers;
|
using System.Buffers;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
|
@ -30,7 +31,9 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures.Internal
|
||||||
|
|
||||||
public override Task FlushAsync() => FlushAsyncCore();
|
public override Task FlushAsync() => FlushAsyncCore();
|
||||||
|
|
||||||
// private non-virtual for internal calling
|
// private non-virtual for internal calling.
|
||||||
|
// It first does a fast check to see if async is necessary, we inline this check.
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
private Task FlushAsyncCore()
|
private Task FlushAsyncCore()
|
||||||
{
|
{
|
||||||
var length = _charBuffer.Length;
|
var length = _charBuffer.Length;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue