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

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

ProfileAutoSaveEventArgs クラス

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

ProfileModule クラスの ProfileAutoSaving イベントデータ提供します

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

Public NotInheritable Class
 ProfileAutoSaveEventArgs
    Inherits EventArgs
Dim instance As ProfileAutoSaveEventArgs
public sealed class ProfileAutoSaveEventArgs
 : EventArgs
public ref class ProfileAutoSaveEventArgs sealed
 : public EventArgs
public final class ProfileAutoSaveEventArgs
 extends EventArgs
public final class ProfileAutoSaveEventArgs
 extends EventArgs
解説解説

ProfileAutoSaveEventHandler デリゲートは、ProfileModule クラスProfileAutoSaving イベントに対して定義されています。ASP.NET アプリケーションの Global.asax ファイルProfileModule クラスProfileAutoSaving イベントには、このトピックの例に示されている方法によってアクセスできますProfileAutoSaving イベントは、ProfileManager.AutomaticSaveEnabled プロパティtrue場合ページ実行終了時発生します

Save メソッドは、プリミティブ型文字列、または DateTime オブジェクト構成されプロパティ値が変更されたかどうかを、ユーザー プロファイル内の各 SettingsPropertyValue の IsDirty プロパティ値をチェックすることで、自動的に判断しますSave メソッドは、カスタム クラス変更されたかどうかを明示的に判断することはできません。カスタム オブジェクト変更されたかどうかは、ProfileAutoSaving イベント使用して判断できますその上でオブジェクト変更されている場合自動保存続行し変更されていない場合自動保存キャンセルできます

プロファイル自動保存処理をキャンセルする場合は、ProfileAutoSaving イベント内の ContinueWithProfileAutoSave プロパティfalse設定しますそれ以外場合は、ContinueWithProfileAutoSave プロパティtrue設定します

ProfileAutoSaving イベントに対して複数のサブスクライバが存在する場合ありますProfileModule は、ContinueWithProfileAutoSave プロパティ最後に設定された値を使用します。したがってProfileAutoSaving イベント内では、自動保存キャンセルする続行するかにかかわらず ContinueWithProfileAutoSave プロパティ明示的に設定して以前のサブスクライバの設定した値が上書きされるようにすることをお勧めます。

使用例使用例

ASP.NET アプリケーションの Global.asax ファイル含まれる ProfileAutoSaving イベント次のコード例示します

Public Sub Profile_ProfileAutoSaving(sender
 As Object, args As ProfileAutoSaveEventArgs)
  If Profile.Cart.HasChanged Then
    args.ContinueWithProfileAutoSave = True
  Else
    args.ContinueWithProfileAutoSave = False
  End If
End Sub
public void Profile_ProfileAutoSaving(object
 sender, ProfileAutoSaveEventArgs args)
{
  if (Profile.Cart.HasChanged)
    args.ContinueWithProfileAutoSave = true;
  else
    args.ContinueWithProfileAutoSave = false;
}
継承階層継承階層
System.Object
   System.EventArgs
    System.Web.Profile.ProfileAutoSaveEventArgs
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

「ProfileAutoSaveEventArgs クラス」の関連用語

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

   

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



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

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

©2024 GRAS Group, Inc.RSS