public IObservable <QueuedDownload> Logout() { return(DownloadManager .CancelAllDownloads() .ObserveOnDispatcher() .Finally(DoLogout)); }
public IObservable <QueuedDownload> FactoryReset() { return(DownloadManager .CancelAllDownloads() .ObserveOnDispatcher() .Finally( () => { RemoveUsers(UserDatabase.Users.ToArray()); ApplicationSettings.ServerUrl = null; StatisticsManager.Statistics.Clear(); DoLogout(); BroadcastFactoryResetEvent(); })); }