ProfileAutoSaveEventArgs 클래스

정의

ProfileAutoSaving 클래스의 ProfileModule 이벤트에 데이터를 제공합니다.

public ref class ProfileAutoSaveEventArgs sealed : EventArgs
public sealed class ProfileAutoSaveEventArgs : EventArgs
type ProfileAutoSaveEventArgs = class
    inherit EventArgs
Public NotInheritable Class ProfileAutoSaveEventArgs
Inherits EventArgs
상속
ProfileAutoSaveEventArgs

예제

다음 코드 예제는 ProfileAutoSaving ASP.NET 애플리케이션의 Global.asax 파일에 포함 된 이벤트입니다.

public void Profile_ProfileAutoSaving(object sender, ProfileAutoSaveEventArgs args)
{
  if (Profile.Cart.HasChanged)
    args.ContinueWithProfileAutoSave = true;
  else
    args.ContinueWithProfileAutoSave = false;
}
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

설명

ProfileAutoSaveEventHandler 대리자에 대해 정의 된 합니다 ProfileAutoSaving 이벤트는 ProfileModule 클래스. 액세스할 수 있습니다 합니다 ProfileAutoSaving 의 이벤트는 ProfileModule 이 항목의 예제와 같이 ASP.NET 애플리케이션의 Global.asax 파일에서 클래스입니다. 합니다 ProfileAutoSaving 이벤트는 페이지 실행이 끝날 때 발생 하는 경우는 ProfileManager.AutomaticSaveEnabled 속성은 true합니다.

Save 메서드는 속성이 있는지 여부를 하는 자동으로 결정 기본 형식, 문자열, 구성 또는 DateTime 개체가 변경 되었는지, 확인 하 여 합니다 IsDirty 각각에 대 한 속성 값 SettingsPropertyValue 사용자 프로필에 합니다. Save 메서드는 사용자 지정 클래스 변경 되었는지 여부를 명시적으로 확인할 수 없습니다. 사용할 수는 ProfileAutoSaving 이벤트를 사용자 지정 개체를 수정 되었는지 여부를 확인 한 다음 개체를 수정 하는 경우 자동 저장을 계속 또는 개체를 수정 하지 않았으면 자동 저장을 취소 합니다.

자동 프로필 저장 작업을 취소 하려면 합니다 ContinueWithProfileAutoSave 속성을 falseProfileAutoSaving 이벤트 설정이 고, 그렇지는 ContinueWithProfileAutoSave 속성을 true.

여러 구독자가 있을 수 있습니다는 ProfileAutoSaving 이벤트입니다. ProfileModule 를 사용 하 여 마지막 값을 ContinueWithProfileAutoSave 속성. 결과적으로, 것이 좋습니다 명시적으로 설정 하는 합니다 ContinueWithProfileAutoSave 속성에는 ProfileAutoSaving 이전 구독자에 게 서 취소 하거나 값을 덮어쓰도록 필요한 수 만큼 자동 저장을 사용 하 여 계속할지 여부에 관계 없이 이벤트 집합입니다.

생성자

ProfileAutoSaveEventArgs(HttpContext)

ProfileAutoSaveEventArgs 클래스의 인스턴스를 만듭니다.

속성

Context

현재 요청에 대한 HttpContext를 가져옵니다.

ContinueWithProfileAutoSave

ProfileModule이 사용자 프로필을 자동으로 저장하는지 여부를 나타내는 값을 가져오거나 설정합니다.

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상

추가 정보