internal static ModelSensitiveInformation Build( string optionCommand, ModelSensitiveInformation modelSI, string value) { switch (optionCommand) { case CommandOption.SI_TYPE: ValidatorEnumSIType.Valid(value); modelSI.type = ConvertStringToEnum <EnumSIType> .Convert(value); break; case CommandOption.SI_NAME: modelSI.informationName = value; break; case CommandOption.SI_CONTAINER: modelSI.containerName = value; break; case CommandOption.SI_NOTES: modelSI.notes = value; break; case CommandOption.SI_USERNAME: modelSI.username = value; break; case CommandOption.SI_PASSWORD: modelSI.password = value; break; case CommandOption.SI_CARD_NAME: modelSI.cardName = value; break; case CommandOption.SI_CARD_ENTITY: modelSI.cardEntity = value; break; case CommandOption.SI_CARD_NUMBER: modelSI.cardNumber = value; break; case CommandOption.SI_CARD_EXP_DATE: modelSI.cardExpirationDate = DateTime.Parse(value); break; case CommandOption.SI_CARD_SECURITY_NUMBER: modelSI.cardSecurityNumber = Int32.Parse(value); break; case CommandOption.SI_CONTACT_NAME: modelSI.contactName = value; break; case CommandOption.SI_CONTACT_LAST_NAME: modelSI.contactLastname = value; break; case CommandOption.SI_BUSSINES_NAME: modelSI.businessName = value; break; case CommandOption.SI_POSTAL_CODE: modelSI.postalCode = Int32.Parse(value); break; case CommandOption.SI_COUNTRY: modelSI.country = value; break; case CommandOption.SI_STATE: modelSI.state = value; break; case CommandOption.SI_BIRTHDAY: modelSI.birthday = DateTime.Parse(value); break; case CommandOption.SI_FAVORITE: modelSI.favorite = true; break; case CommandOption.SI_CONTENT_KEY: modelSI.contentKey = value; break; case CommandOption.SI_URLS_LIST: modelSI.urlsList.AddRange(value.Split(sign)); break; case CommandOption.SI_TAGS_LIST: modelSI.tagsList.AddRange(value.Split(sign)); break; case CommandOption.SI_EMAILS_LIST: modelSI.emailsList.AddRange(value.Split(sign)); break; case CommandOption.SI_PHONE_NUMBERS_LIST: modelSI.phoneNumbersList.AddRange(value.Split(sign)); break; case CommandOption.SI_ADDRESSES_LIST: modelSI.addressesList.AddRange(value.Split(sign)); break; } return(modelSI); }
internal static SensitiveInformation Build( string optionCommand, SensitiveInformation modelSI, string value) { switch (optionCommand) { case CommandOption.SI_TYPE: ValidatorEnumSIType.Valid(value); return(UseCaseBuilder.AddType(modelSI, value)); case CommandOption.SI_NAME: return(UseCaseBuilder.AddName(modelSI, value)); case CommandOption.SI_CONTAINER: return(UseCaseBuilder.AddContainerName(modelSI, value)); case CommandOption.SI_NOTES: return(UseCaseBuilder.AddNote(modelSI, value)); case CommandOption.SI_USERNAME: return(UseCaseBuilder.AddUsername(modelSI, value)); case CommandOption.SI_PASSWORD: return(UseCaseBuilder.AddPassword(modelSI, value)); case CommandOption.SI_CARD_NAME: return(UseCaseBuilder.AddCardName(modelSI, value)); case CommandOption.SI_CARD_ENTITY: return(UseCaseBuilder.AddCardEntity(modelSI, value)); case CommandOption.SI_CARD_NUMBER: return(UseCaseBuilder.AddCardNumber(modelSI, value)); case CommandOption.SI_CARD_EXP_DATE: return(UseCaseBuilder.AddCardExpirationDate(modelSI, value)); case CommandOption.SI_CARD_SECURITY_NUMBER: return(UseCaseBuilder.AddCardSecurityNumber(modelSI, value)); case CommandOption.SI_CONTACT_NAME: return(UseCaseBuilder.AddContactName(modelSI, value)); case CommandOption.SI_CONTACT_LAST_NAME: return(UseCaseBuilder.AddContactLastname(modelSI, value)); case CommandOption.SI_BUSSINES_NAME: return(UseCaseBuilder.AddBusinessName(modelSI, value)); case CommandOption.SI_POSTAL_CODE: return(UseCaseBuilder.AddPostalCode(modelSI, value)); case CommandOption.SI_COUNTRY: return(UseCaseBuilder.AddCountry(modelSI, value)); case CommandOption.SI_STATE: return(UseCaseBuilder.AddState(modelSI, value)); case CommandOption.SI_BIRTHDAY: return(UseCaseBuilder.AddBirthday(modelSI, value)); case CommandOption.SI_FAVORITE: return(UseCaseBuilder.AddFavorite(modelSI)); case CommandOption.SI_CONTENT_KEY: return(UseCaseBuilder.AddContentKey(modelSI, value)); case CommandOption.SI_URLS_LIST: return(UseCaseBuilder.AddUrlsList(modelSI, value)); case CommandOption.SI_TAGS_LIST: return(UseCaseBuilder.AddTagsList(modelSI, value)); case CommandOption.SI_EMAILS_LIST: return(UseCaseBuilder.AddEmailsList(modelSI, value)); case CommandOption.SI_PHONE_NUMBERS_LIST: return(UseCaseBuilder.AddPhoneNumbersList(modelSI, value)); case CommandOption.SI_ADDRESSES_LIST: return(UseCaseBuilder.AddAddressesList(modelSI, value)); } return(modelSI); }