private static Task <bool> CheckServerStatus() { return(MenuCommandDispatcher .InvokeAsync <bool>(GeneralConstants .ServerCheckCommandCharacter, applicationState, CancellationToken.None)); }
private static async Task <bool> ParseInput( char input) { try { return(await MenuCommandDispatcher .InvokeAsync <bool>( input, applicationState, CancellationToken.None)); } catch (DispatcherNotFoundException ex) { throw new InvalidOperationException( "Input must be a number between 1-2 or q to quit", ex); } catch (NullReferenceException ex) { throw new InvalidOperationException( ex.Message, ex); } }