Implement FlushInputBuffer
This commit is contained in:
parent
80486044d8
commit
290cc2c2de
|
@ -1699,11 +1699,14 @@ namespace Microsoft.PowerShell
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This API resets the input buffer. In this example this
|
/// This API resets the input buffer.
|
||||||
/// functionality is not needed so the method returns nothing.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override void FlushInputBuffer()
|
public override void FlushInputBuffer()
|
||||||
{
|
{
|
||||||
|
if (!Console.IsInputRedirected)
|
||||||
|
{
|
||||||
|
Console.OpenStandardInput().Flush();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in a new issue