/// <summary> /// Creates a deep clone of this instance /// </summary> /// <returns>Cloned state instance</returns> public BlazorBoardState Clone(Action <BlazorBoardState> action = null) { var clone = new BlazorBoardState { Themes = new List <ComboDataItem>(Themes), SelectedThemeId = SelectedThemeId, FontSizes = new List <ComboDataItem>(FontSizes), SelectedFontSizeId = SelectedFontSizeId, Demos = new List <ComboDataItem>(Demos), SelectedDemoId = SelectedDemoId, Scenarios = new List <ComboDataItem>(Scenarios), SelectedScenarioId = SelectedScenarioId, SourceFiles = new List <ComboDataItem>(SourceFiles), SelectedSourceFileName = SelectedSourceFileName }; action?.Invoke(clone); return(clone); }
/// <summary> /// Override this method to handle the AppStateChanged event /// </summary> /// <param name="state">New application state</param> protected virtual void OnAppStateChanged(BlazorBoardState state) { }