TraceContextEventArgs クラスとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > TraceContextEventArgs クラスの意味・解説 

TraceContextEventArgs クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

TraceFinished イベント処理するメソッドトレース レコードコレクション提供します。このクラス継承できません。

名前空間: System.Web
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public NotInheritable Class
 TraceContextEventArgs
    Inherits EventArgs
Dim instance As TraceContextEventArgs
public sealed class TraceContextEventArgs :
 EventArgs
public ref class TraceContextEventArgs sealed
 : public EventArgs
public final class TraceContextEventArgs extends
 EventArgs
public final class TraceContextEventArgs extends
 EventArgs
解説解説
使用例使用例

TraceContextEventHandler デリゲート登録して TraceFinished イベント処理する方法次のコード例示します。この例では、OnTraceFinished メソッドが TraceRecords プロパティ通じて TraceContextRecord オブジェクトコレクションアクセスし、このコレクション反復処理して、応答ストリーム書き込んでます。

<%@ Page language="VB" Trace="true"
 %>
<script runat="server">
' The Page_Load method.
Private Sub Page_Load(sender As
 Object, e As EventArgs)

    ' Register a handler for the TraceFinished event.
    AddHandler Trace.TraceFinished, AddressOf
 OnTraceFinished

    ' Write a trace message.
    Trace.Write("Web Forms Infrastructure Methods",
 "USERMESSAGE: Page_Load complete.")
End Sub ' Page_Load
 
' A TraceContextEventHandler for the TraceFinished event.
Private Sub OnTraceFinished(sender As
 Object, e As TraceContextEventArgs)

    Dim r As TraceContextRecord
    Dim o As Object
    
    ' Iterate through the collection of trace records and write 
    ' them to the response stream.

    For Each o In e.TraceRecords
        r = CType(o, TraceContextRecord)
        Response.Write(String.Format("trace
 message: {0} <BR>", r.Message))
    Next

End Sub ' OnTraceFinished
</script>
<%@ Page language="c#" Trace="true" %>
<script runat="server">
void Page_Load(object sender, EventArgs e)
{
    // Register a handler for the TraceFinished event.
    Trace.TraceFinished += new 
        TraceContextEventHandler(this.OnTraceFinished);

    // Write a trace message.
    Trace.Write("Web Forms Infrastructure Methods", "USERMESSAGE:
 Page_Load complete.");
}
 
// A TraceContextEventHandler for the TraceFinished event.
void OnTraceFinished(object sender, TraceContextEventArgs e)
{
    TraceContextRecord r = null;    
    
    // Iterate through the collection of trace records and write 
    // them to the response stream.
    foreach(object o in e.TraceRecords)
    {
        r = (TraceContextRecord)o;
        Response.Write(String.Format("trace message: {0} <BR>", r.Message));
    }
}       
</script>
.NET Framework のセキュリティ.NET Frameworkセキュリティ
継承階層継承階層
System.Object
   System.EventArgs
    System.Web.TraceContextEventArgs
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
TraceContextEventArgs メンバ
System.Web 名前空間
TraceContextEventHandler
TraceContext.TraceFinished イベント
TraceContext クラス
その他の技術情報
ASP.NETトレース


このページでは「.NET Framework クラス ライブラリ リファレンス」からTraceContextEventArgs クラスを検索した結果を表示しています。
Weblioに収録されているすべての辞書からTraceContextEventArgs クラスを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からTraceContextEventArgs クラス を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「TraceContextEventArgs クラス」の関連用語

TraceContextEventArgs クラスのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



TraceContextEventArgs クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS