RuleFiringRecordとは? わかりやすく解説

RuleFiringRecord クラス

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

WebManagementEvent クラスから派生するイベントの発生レコードを表し、IWebEventCustomEvaluator インターフェイスを実装します。

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

Public NotInheritable Class
 RuleFiringRecord
Dim instance As RuleFiringRecord
public sealed class RuleFiringRecord
public ref class RuleFiringRecord sealed
public final class RuleFiringRecord
public final class RuleFiringRecord
解説解説
使用例使用例

CanFire メソッドに渡すときの RuleFiringRecord の使用方法のコード例を次に示します。

' Implements the IWebEventCustomEvaluator.CanFire 
' method. It is called by the ASP.NET if this custom
' type is configured in the profile
' element of the healthMonitoring section.
Public Function CanFire( _
ByVal e As System.Web.Management.WebBaseEvent,
 _
ByVal rule As RuleFiringRecord) As
 Boolean _
Implements System.Web.Management.IWebEventCustomEvaluator.CanFire

    Dim fireEvent As Boolean
    Dim lastFired As String
 = _
        rule.LastFired.ToString()
    Dim timesRaised As String
 = _
        rule.TimesRaised.ToString()

    ' Fire every other event raised.
    fireEvent = _
    IIf(rule.TimesRaised Mod 2 = 0, True, False)

    If fireEvent Then
        firingRecordInfo = String.Format( _
        "Event last fired: {0}", lastFired) + _
        String.Format( _
        ". Times raised: {0}",  timesRaised) 
      
    Else
        firingRecordInfo = String.Format( _
        "Event not fired. Times raised: {0}", _
        timesRaised)
    End If

    Return fireEvent

End Function 'CanFire

// Implements the IWebEventCustomEvaluator.CanFire 
// method. It is called by the ASP.NET if this custom
// type is configured in the profile
// element of the healthMonitoring section.
public bool CanFire(
    System.Web.Management.WebBaseEvent e, 
    RuleFiringRecord rule)
{

    bool fireEvent;
    string lastFired = rule.LastFired.ToString();
    string timesRaised = rule.TimesRaised.ToString();

    // Fire every other event raised.
    fireEvent =
        (rule.TimesRaised % 2 == 0) ? true : false;

    if (fireEvent)
    {
        firingRecordInfo =
            string.Format("Event last fired: {0}",
            lastFired) +
            string.Format(". Times raised: {0}",
            timesRaised);
    }
    else
        firingRecordInfo =
          string.Format(
           "Event not fired. Times raised: {0}",
           timesRaised);

    return fireEvent;

}
継承階層継承階層
System.Object
  System.Web.Management.RuleFiringRecord
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
RuleFiringRecord メンバ
System.Web.Management 名前空間

RuleFiringRecord プロパティ


パブリック プロパティパブリック プロパティ

参照参照

関連項目

RuleFiringRecord クラス
System.Web.Management 名前空間

RuleFiringRecord メソッド


RuleFiringRecord メンバ

WebManagementEvent クラスから派生するイベントの発生レコードを表し、IWebEventCustomEvaluator インターフェイスを実装します。

RuleFiringRecord データ型で公開されるメンバを以下の表に示します。


パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

RuleFiringRecord クラス
System.Web.Management 名前空間



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

「RuleFiringRecord」の関連用語

RuleFiringRecordのお隣キーワード

   

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



RuleFiringRecordのページの著作権

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

©2026 GRAS Group, Inc.RSS