GZipStream.EndWrite(IAsyncResult) Метод
Определение
Обрабатывает завершение операции асинхронной записи.Handles the end of an asynchronous write operation. (Вместо него рекомендуется использовать метод WriteAsync(Byte[], Int32, Int32).)(Consider using the WriteAsync(Byte[], Int32, Int32) method instead.)
public:
override void EndWrite(IAsyncResult ^ asyncResult);
public:
override void EndWrite(IAsyncResult ^ async_result);
public override void EndWrite (IAsyncResult asyncResult);
public override void EndWrite (IAsyncResult async_result);
override this.EndWrite : IAsyncResult -> unit
override this.EndWrite : IAsyncResult -> unit
Public Overrides Sub EndWrite (asyncResult As IAsyncResult)
Public Overrides Sub EndWrite (async_result As IAsyncResult)
Параметры
- asyncResultasync_result
- IAsyncResult
Объект, который представляет асинхронный вызов.The object that represents the asynchronous call.
Исключения
Основной поток является null
.The underlying stream is null
.
-или--or- Основной поток закрыт.The underlying stream is closed.
Комментарии
Начиная с .NET Framework 4,5.NET Framework 4.5 , можно выполнять асинхронные операции записи с помощью Stream.WriteAsync метода.Starting with the .NET Framework 4,5.NET Framework 4.5, you can perform asynchronous write operations by using the Stream.WriteAsync method. EndWriteМетод по-прежнему доступен в .NET Framework 4,5.NET Framework 4.5 для поддержки устаревшего кода. Однако асинхронные операции ввода-вывода можно легко реализовать с помощью новых асинхронных методов.The EndWrite method is still available in .NET Framework 4,5.NET Framework 4.5 to support legacy code; however, you can implement asynchronous I/O operations more easily by using the new async methods. Дополнительные сведения см. в разделе Асинхронный файловый ввод-вывод.For more information, see Asynchronous File I/O.
EndWriteМетод завершает операцию асинхронной записи, запущенную в BeginWrite методе.The EndWrite method completes the asynchronous write operation started in the BeginWrite method.