AnonymousIdentificationEventHandler 대리자

정의

AnonymousIdentificationModuleAnonymousIdentification_Creating 이벤트를 처리하는 메서드를 나타냅니다.

public delegate void AnonymousIdentificationEventHandler(System::Object ^ sender, AnonymousIdentificationEventArgs ^ e);
public delegate void AnonymousIdentificationEventHandler(object sender, AnonymousIdentificationEventArgs e);
type AnonymousIdentificationEventHandler = delegate of obj * AnonymousIdentificationEventArgs -> unit
Public Delegate Sub AnonymousIdentificationEventHandler(sender As Object, e As AnonymousIdentificationEventArgs)

매개 변수

sender
Object

이벤트 소스입니다.

e
AnonymousIdentificationEventArgs

이벤트 데이터를 포함하는 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

설명

AnonymousIdentificationEventHandler 대리자에 대해 정의 된 합니다 Creating 이벤트는 AnonymousIdentificationModule 클래스. 액세스할 수 있습니다 합니다 Creating 의 이벤트를 AnonymousIdentificationModule 라는 서브루틴을 지정 하 여 클래스 AnonymousIdentification_Creating ASP.NET 애플리케이션의 Global.asax 파일에. 합니다 Creating 이벤트가 발생 하는 동안는 PostAuthenticateRequest 이벤트입니다.

AnonymousIdentificationModule 생성는 AnonymousIdentificationEventArgs 현재 사용 하 여 개체 HttpContext 에 전달 합니다 AnonymousIdentification_Creating 이벤트입니다.

사용할 수는 AnonymousID 의 속성을 AnonymousIdentificationEventArgs 개체가 제공를 AnonymousIdentification_Creating 이벤트가 사용자 지정 값으로 익명 식별자를 설정 합니다. 에 대 한 값을 지정 하지 않는 경우는 AnonymousID 중에 속성을 AnonymousIdentification_Creating 이벤트를 Guid 사용 됩니다.

AnonymousIdentification_Creating 이벤트는 anonymousIdentification> 구성 요소를 true로 설정하여 익명 ID가 Enabled<인 경우에만 발생합니다.

확장 메서드

GetMethodInfo(Delegate)

지정된 대리자가 나타내는 메서드를 나타내는 개체를 가져옵니다.

적용 대상