public PersistThisModel ( IPersistentApplicationStateObject model ) : void | ||
model | IPersistentApplicationStateObject | /// The model to persist. The type of this model will be used as a key and when data is loaded back from persistent storage this key (type) will be used /// to retrieve it. No other component should use this type, or collisions will occur. /// |
return | void |
private void OnApplicationStateRequested(ApplicationStateRequestedMessage message) { var widgetStates = this.dashboardService.PreparePersistentStateData(); message.PersistThisModel(widgetStates); }
private void OnApplicationStateRequested(ApplicationStateRequestedMessage message) { var shellPersistentStateV1 = new ShellPersistentState { Size = WindowSize, TopLeft = WindowTopLeft }; message.PersistThisModel(shellPersistentStateV1); var dataFileState = this.persistenceOperations.PreparePersistentStateData(); message.PersistThisModel(dataFileState); }