Exemplo n.º 1
0
 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");
 }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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);
        }