WebClient.WriteStreamClosed 事件

定义

注意

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

当使用写入流将数据写入资源的异步操作关闭时发生。

public:
 event System::Net::WriteStreamClosedEventHandler ^ WriteStreamClosed;
[System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)]
public event System.Net.WriteStreamClosedEventHandler? WriteStreamClosed;
[System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)]
public event System.Net.WriteStreamClosedEventHandler WriteStreamClosed;
[<System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)>]
member this.WriteStreamClosed : System.Net.WriteStreamClosedEventHandler 
Public Custom Event WriteStreamClosed As WriteStreamClosedEventHandler 

事件类型

属性

注解

谨慎

WebRequestHttpWebRequestServicePointWebClient 已过时,不应将其用于新开发。 请改用 HttpClient

每次使用写入流将数据写入资源的异步操作关闭时都会引发此事件。 这些操作由调用 OpenWriteTaskAsync 方法导致。

WriteStreamClosedEventHandler 是此事件的委托。 WriteStreamClosedEventArgs 类为事件处理程序提供事件数据。

有关如何处理事件的详细信息,请参阅 处理和引发事件

适用于