예제 #1
0
        private static Task FlushAsync(WritableBuffer writeBuffer)
        {
            var awaitable = writeBuffer.FlushAsync();

            if (awaitable.IsCompleted)
            {
                awaitable.GetResult();
                return(_completedTask);
            }

            return(FlushAsyncAwaited(awaitable));
        }
 private static async Task AwaitFlushAsync(WritableBuffer writeBuffer)
 {
     await writeBuffer.FlushAsync();
 }