Compensator.AbortRecord メソッドとは? わかりやすく解説

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

Compensator.AbortRecord メソッド

中止フェーズ時に CRM Compensator にログ レコード配信します

名前空間: System.EnterpriseServices.CompensatingResourceManager
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)
構文構文

Public Overridable Function
 AbortRecord ( _
    rec As LogRecord _
) As Boolean
Dim instance As Compensator
Dim rec As LogRecord
Dim returnValue As Boolean

returnValue = instance.AbortRecord(rec)
public virtual bool AbortRecord (
    LogRecord rec
)
public:
virtual bool AbortRecord (
    LogRecord^ rec
)
public boolean AbortRecord (
    LogRecord rec
)
public function AbortRecord (
    rec : LogRecord
) : boolean

パラメータ

rec

配信するログ レコード

戻り値
配信されレコード認識しないようにする必要がある場合trueそれ以外場合false

使用例使用例

このメソッド実装方法次のコード例示します

Public Overrides Function
 AbortRecord(ByVal log As LogRecord) As
 Boolean 
    
    ' Check the validity of the record.
    If log Is Nothing Then
        Return True
    End If
    Dim record As [Object]() = log.Record
    
    If record Is Nothing
 Then
        Return True
    End If
    If record.Length <> 2 Then
        Return True
    End If 
    ' Extract old account data from the record.
    Dim filename As String
 = CStr(record(0))
    Dim balance As Integer
 = Fix(record(1))
    
    ' Restore the old state of the account.
    AccountManager.WriteAccountBalance(filename, balance)
    
    Return False

End Function 'AbortRecord

public override bool AbortRecord (LogRecord
 log)
{

    // Check the validity of the record.
    if (log == null) return(true);
    Object[] record = log.Record as Object[];
    if (record == null) return(true);
    if (record.Length != 2) return(true);

    // Extract old account data from the record.
    string filename = (string) record[0];
    int balance = (int) record[1];
 
    // Restore the old state of the account.
    AccountManager.WriteAccountBalance(filename, balance);

    return(false);
}
public:
    virtual bool AbortRecord(LogRecord^ log) override
    {

        // Check the validity of the record.
        if (log == nullptr)
        {
            return true;
        }
        array<Object^>^ record = dynamic_cast<array<Object^>^>(log->Record);
        if (record == nullptr)
        {
            return true;
        }
        if (record->Length != 2)
        {
            return true;
        }

        // Extract old account data from the record.
        String^ filename = (String^) record[0];
        int balance = (int) record[1];

        // Restore the old state of the account.
        WriteAccountBalance(filename, balance);

        return false;
    }
public boolean AbortRecord(LogRecord log)
{
    // Check the validity of the record.
    if (log == null) {
        return true;
    }
    Object record[] = new Object[] { log.get_Record() };

    if (record == null) {
        return true;
    }
    if (record.get_Length() != 2) {
        return true;
    }
    // Extract old account data from the record.
    String fileName = (String)(record.get_Item(0));
    int balance = System.Convert.ToInt32(record[1]);

    // Restore the old state of the account.
    AccountManager.WriteAccountBalance(fileName, balance);

    return false;
} //AbortRecord
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Compensator クラス
Compensator メンバ
System.EnterpriseServices.CompensatingResourceManager 名前空間



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

辞書ショートカット

すべての辞書の索引

Compensator.AbortRecord メソッドのお隣キーワード
検索ランキング

   

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



Compensator.AbortRecord メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS