// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Windows.Foundation; namespace Microsoft.CmdPal.UI.ViewModels.Services; /// /// Manages the lifecycle of : load, save, and change notification. /// public interface IAppStateService { /// /// Gets the current application state instance. /// AppStateModel State { get; } /// /// Persists the current state to disk and raises . /// void Save(); /// /// Atomically applies a transformation to the current state, persists the result, /// and raises . /// void UpdateState(Func transform); /// /// Raised after state has been saved to disk. /// event TypedEventHandler StateChanged; }