WebClient.OnUploadValuesCompleted(UploadValuesCompletedEventArgs) メソッド

定義

UploadValuesCompleted イベントを発生させます。Raises the UploadValuesCompleted event.

protected:
 virtual void OnUploadValuesCompleted(System::Net::UploadValuesCompletedEventArgs ^ e);
protected virtual void OnUploadValuesCompleted (System.Net.UploadValuesCompletedEventArgs e);
abstract member OnUploadValuesCompleted : System.Net.UploadValuesCompletedEventArgs -> unit
override this.OnUploadValuesCompleted : System.Net.UploadValuesCompletedEventArgs -> unit
Protected Overridable Sub OnUploadValuesCompleted (e As UploadValuesCompletedEventArgs)

パラメーター

e
UploadValuesCompletedEventArgs

イベント データを格納している UploadValuesCompletedEventArgs オブジェクト。A UploadValuesCompletedEventArgs object containing event data.

次のコード例は、から派生したクラスによってカスタマイズできる、このメソッドの実装を示して WebClient います。The following code example shows an implementation of this method that can be customized by a class derived from WebClient.

virtual void OnUploadValuesCompleted( UploadValuesCompletedEventArgs ^ e ) override
{
   // Here you can perform any custom actions before the event is raised
   // and event handlers are called...
   WebClient::OnUploadValuesCompleted( e );
   
   // Here you can perform any post event actions...
}
protected override void OnUploadValuesCompleted (UploadValuesCompletedEventArgs e)
{
    // Here you can perform any custom actions before the event is raised
    // and event handlers are called...

    base.OnUploadValuesCompleted (e);

    // Here you can perform any post event actions...
}

注釈

このクラスを継承するクラスは、このメソッドをオーバーライドして、イベントが発生したときに追加のタスクを実行でき UploadValuesCompleted ます。Classes that inherit from this class can override this method to perform additional tasks when the UploadValuesCompleted event occurs.

イベントを発生させると、イベント ハンドラーがデリゲートから呼び出されます。Raising an event invokes the event handler through a delegate. 詳細については、処理とイベントの発生 を参照してください。For more information, see Handling and Raising Events.

OnUploadValuesCompleted メソッドを使用すると、デリゲートを結び付けずに、派生クラスでイベントを処理することもできます。The OnUploadValuesCompleted method also allows derived classes to handle the event without attaching a delegate. 派生クラスでイベントを処理する場合は、この手法をお勧めします。This is the preferred technique for handling the event in a derived class.

注意 (継承者)

派生クラスでをオーバーライドする場合は OnUploadValuesCompleted(UploadValuesCompletedEventArgs) 、登録されて OnUploadValuesCompleted(UploadValuesCompletedEventArgs) いるデリゲートがイベントを受け取るように、基本クラスのメソッドを呼び出す必要があります。When overriding OnUploadValuesCompleted(UploadValuesCompletedEventArgs) in a derived class, be sure to call the base class' OnUploadValuesCompleted(UploadValuesCompletedEventArgs) method so that registered delegates receive the event.

適用対象