public void Handle(List <string> listArgs) { ValidatorArgument.Validate(listArgs); ValidatorOptionCommandKey.Validate(listArgs[0]); string optionCommandKey = listArgs[0]; listArgs.RemoveAt(0); ValidatorArgument.Validate(listArgs); string idOrUuid = listArgs[0]; listArgs.RemoveAt(0); List <ModelSensitiveInformation> listSI = CoreManagerSensitiveInformation.Read(); if (optionCommandKey.Equals(CommandOptionKey.SI_UUID)) { ModelSensitiveInformation modelSI = listSI.Find(si => si.uuid.Equals(idOrUuid)); ValidatorIsNull.Validate(modelSI); modelSI = HandlerAddHelper.Handle(listArgs, modelSI); CoreManagerSensitiveInformation.Update(idOrUuid, modelSI); } else if (optionCommandKey.Equals(CommandOptionKey.SI_ID)) { ModelSensitiveInformation modelSI = listSI.Find(si => si.id.ToString().Equals(idOrUuid)); ValidatorIsNull.Validate(modelSI); modelSI = HandlerAddHelper.Handle(listArgs, modelSI); CoreManagerSensitiveInformation.Update(Int32.Parse(idOrUuid), modelSI); } Console.WriteLine("Update sucessfully"); }
public void Handle(List <string> listArgs) { SensitiveInformation modelSI; modelSI = HandlerAddHelper.Handle(listArgs, new SensitiveInformation()); ContainerUseCase.getUseCaseCrud().Create(modelSI); Console.WriteLine("Create sucessfully"); }
public void Handle(List <string> listArgs) { ModelSensitiveInformation modelSI; modelSI = HandlerAddHelper.Handle(listArgs, new ModelSensitiveInformation()); CoreManagerSensitiveInformation.Create(modelSI); Console.WriteLine("Create sucessfully"); }