C# 클래스 MvvmCross.WindowsCommon.Views.Suspension.MvxSuspensionManager

MvxSuspensionManager captures global session state to simplify process lifetime management for an application. Note that session state will be automatically cleared under a variety of conditions and should only be used to store information that would be convenient to carry across sessions, but that should be discarded when an application crashes or is upgraded.
상속: IMvxSuspensionManager
파일 보기 프로젝트 열기: MvvmCross/MvvmCross

공개 메소드들

메소드 설명
RegisterFrame ( IMvxWindowsFrame frame, String sessionStateKey ) : void

Registers a Frame instance to allow its navigation history to be saved to and restored from SessionState. Frames should be registered once immediately after creation if they will participate in session state management. Upon registration if state has already been restored for the specified key the navigation history will immediately be restored. Subsequent invocations of RestoreAsync will also restore navigation history.

RestoreAsync ( ) : System.Threading.Tasks.Task

Restores previously saved SessionState. Any Frame instances registered with RegisterFrame will also restore their prior navigation state, which in turn gives their active Page an opportunity restore its state.

SaveAsync ( ) : System.Threading.Tasks.Task

Save the current SessionState. Any Frame instances registered with RegisterFrame will also preserve their current navigation stack, which in turn gives their active Page an opportunity to save its state.

SessionStateForFrame ( IMvxWindowsFrame frame ) : Object>.Dictionary

Provides storage for session state associated with the specified Frame. Frames that have been previously registered with RegisterFrame have their session state saved and restored automatically as a part of the global SessionState. Frames that are not registered have transient state that can still be useful when restoring pages that have been discarded from the navigation cache.

Apps may choose to rely on LayoutAwarePage to manage page-specific state instead of working with frame session state directly.

UnregisterFrame ( IMvxWindowsFrame frame ) : void

Disassociates a Frame previously registered by RegisterFrame from SessionState. Any navigation state previously captured will be removed.

비공개 메소드들

메소드 설명
RestoreFrameNavigationState ( IMvxWindowsFrame frame ) : void
SaveFrameNavigationState ( IMvxWindowsFrame frame ) : void

메소드 상세

RegisterFrame() 공개 메소드

Registers a Frame instance to allow its navigation history to be saved to and restored from SessionState. Frames should be registered once immediately after creation if they will participate in session state management. Upon registration if state has already been restored for the specified key the navigation history will immediately be restored. Subsequent invocations of RestoreAsync will also restore navigation history.
public RegisterFrame ( IMvxWindowsFrame frame, String sessionStateKey ) : void
frame IMvxWindowsFrame An instance whose navigation history should be managed by ///
sessionStateKey String A unique key into used to /// store navigation-related information.
리턴 void

RestoreAsync() 공개 메소드

Restores previously saved SessionState. Any Frame instances registered with RegisterFrame will also restore their prior navigation state, which in turn gives their active Page an opportunity restore its state.
public RestoreAsync ( ) : System.Threading.Tasks.Task
리턴 System.Threading.Tasks.Task

SaveAsync() 공개 메소드

Save the current SessionState. Any Frame instances registered with RegisterFrame will also preserve their current navigation stack, which in turn gives their active Page an opportunity to save its state.
public SaveAsync ( ) : System.Threading.Tasks.Task
리턴 System.Threading.Tasks.Task

SessionStateForFrame() 공개 메소드

Provides storage for session state associated with the specified Frame. Frames that have been previously registered with RegisterFrame have their session state saved and restored automatically as a part of the global SessionState. Frames that are not registered have transient state that can still be useful when restoring pages that have been discarded from the navigation cache.
Apps may choose to rely on LayoutAwarePage to manage page-specific state instead of working with frame session state directly.
public SessionStateForFrame ( IMvxWindowsFrame frame ) : Object>.Dictionary
frame IMvxWindowsFrame The instance for which session state is desired.
리턴 Object>.Dictionary

UnregisterFrame() 공개 메소드

Disassociates a Frame previously registered by RegisterFrame from SessionState. Any navigation state previously captured will be removed.
public UnregisterFrame ( IMvxWindowsFrame frame ) : void
frame IMvxWindowsFrame An instance whose navigation history should no longer be /// managed.
리턴 void