AnonymousIdentificationEventArgs クラス

定義

AnonymousIdentification_Creating イベントのデータを提供します。 このクラスは継承できません。

public ref class AnonymousIdentificationEventArgs sealed : EventArgs
public sealed class AnonymousIdentificationEventArgs : EventArgs
type AnonymousIdentificationEventArgs = class
    inherit EventArgs
Public NotInheritable Class AnonymousIdentificationEventArgs
Inherits EventArgs
継承
AnonymousIdentificationEventArgs

次のコード例では 、AnonymousIdentification_Creating イベントを使用して匿名識別子をカスタム値に設定します。

public void AnonymousIdentification_Creating(object sender, 
                                             AnonymousIdentificationEventArgs args)
{
  args.AnonymousID = Samples.AspNet.Security.MyIdClass.GetAnonymousId();
  Samples.AspNet.Security.MyIdClass.LogAnonymousId(args.AnonymousID);
}
Public Sub AnonymousIdentification_Creating(sender As Object,  _
                                            args As AnonymousIdentificationEventArgs)
  args.AnonymousID = Samples.AspNet.Security.MyIdClass.GetAnonymousId()
  Samples.AspNet.Security.MyIdClass.LogAnonymousId(args.AnonymousId)
End Sub

注釈

このAnonymousIdentificationEventArgsクラスは、イベントにイベント値を指定し、現在のCreating要求のカスタム Windows ID を指定するために使用されます。 ASP.NET アプリケーションの AnonymousIdentificationModule Global.asax ファイルに AnonymousIdentification_Creating という名前のサブルーチンを指定することで、クラスのイベントにアクセスCreatingできます。

現在AnonymousIdentificationModuleHttpContextのオブジェクトをAnonymousIdentificationEventArgs使用してオブジェクトを構築し、AnonymousIdentification_Creating イベントに渡します。

AnonymousIdentification_Creating イベントに指定されたオブジェクトのAnonymousIdentificationEventArgsプロパティを使用AnonymousIDして、匿名識別子をカスタム値に設定できます。 AnonymousIdentification_Creating イベント中にプロパティのAnonymousID値を指定しない場合は、a Guid が使用されます。

AnonymousIdentification_Creating イベントは、匿名 ID がEnabled指定されている場合にのみ発生します。

コンストラクター

AnonymousIdentificationEventArgs(HttpContext)

AnonymousIdentificationEventArgs クラスの新しいインスタンスを初期化します。

プロパティ

AnonymousID

ユーザーの匿名識別子を取得または設定します。

Context

現在の HTTP 要求に対する HttpContext オブジェクトを取得します。

メソッド

Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

適用対象