public void ShouldWriteLogMessagesBasic() { LogFns.DebugWriteLine("Testing LogFns.DebugWriteLine"); LogFns.DebugWriteLineIf(true, "Testing LogFns.DebugWriteLineIf"); LogFns.TraceWriteLine("Testing LogFns.TraceWriteLine"); LogFns.TraceWriteLineIf(true, "Testing LogFns.TraceWriteLineIf"); }
public async void Logout() { var home = GetHomeScreen(); LogFns.DebugWriteLineIf(home == null, "No workspace marked as default."); if (home == null) { return; } await NavigateToWorkspace(home); await _authenticationService.LogoutAsync(); await Login(); }
public void HandleError(Exception ex) { string customMessage = null; if (ex is EntityManagerSaveException && ((EntityManagerSaveException)ex).FailureType == PersistenceFailure.Concurrency) { customMessage = "Another user has previously saved the current record."; } if (ex is TaskCanceledException) { // Log and ignore LogFns.DebugWriteLine(ex.Message); return; } _dialogManager.ShowMessageAsync(customMessage ?? ex.Message, DialogButtons.Ok); }