public override int Run(string[] remainingArguments) { try { FormatOutput.Issuers(_uow, new List <E_Issuer> { _issuer }); Console.Out.WriteLine(); Console.Out.Write(" *** Enter 'yes' to delete issuer *** : "); var input = StandardInput.GetInput(); Console.Out.WriteLine(); if (input.ToLower() == "yes") { _ = _service.Issuer_DeleteV1(_issuer.Id) .Result; } return(StandardOutput.FondFarewell()); } catch (Exception ex) { return(StandardOutput.AngryFarewell(ex)); } }
public override int Run(string[] remainingArguments) { try { if (_isEnabled.HasValue) { _issuer.IsEnabled = _isEnabled.Value; } if (_isDeletable.HasValue) { _issuer.IsDeletable = _isDeletable.Value; } var issuer = _service.Issuer_UpdateV1(_map.Map <IssuerV1>(_issuer)) .Result; FormatOutput.Issuers(_uow, new List <E_Issuer> { _map.Map <E_Issuer>(issuer) }, true); return(StandardOutput.FondFarewell()); } catch (Exception ex) { return(StandardOutput.AngryFarewell(ex)); } }
public override int Run(string[] remainingArguments) { try { var expression = QueryExpressionFactory.GetQueryExpression <E_Issuer>(); if (!string.IsNullOrEmpty(_filter)) { expression = expression.Where(x => x.Name.Contains(_filter)); } _issuers = _uow.Issuers.Get(expression.ToLambda(), new List <Expression <Func <E_Issuer, object> > >() { x => x.Audiences, x => x.Claims, }) .TakeLast(_count); FormatOutput.Issuers(_uow, _issuers.OrderBy(x => x.Name)); return(StandardOutput.FondFarewell()); } catch (Exception ex) { return(StandardOutput.AngryFarewell(ex)); } }
public override int Run(string[] remainingArguments) { try { FormatOutput.Issuers(_uow, new List <E_Issuer> { _issuer }, true); return(StandardOutput.FondFarewell()); } catch (Exception ex) { return(StandardOutput.AngryFarewell(ex)); } }
public override int Run(string[] remainingArguments) { try { var issuer = _service.Issuer_CreateV1( new IssuerV1() { Name = _issuerName, IsEnabled = true, IsDeletable = true, }).Result; FormatOutput.Issuers(_uow, new List <E_Issuer> { _map.Map <E_Issuer>(issuer) }); return(StandardOutput.FondFarewell()); } catch (Exception ex) { return(StandardOutput.AngryFarewell(ex)); } }