public string Symbol() { if (Phones.Count == 0) { return(""); } return(string.Join('-', Phones.Select(x => x.Code))); }
public void Decrypt(SCMS.Foundation.Security.SymmetricCipherProvider symmetricCipherProvider) { if (symmetricCipherProvider == null) { throw new Exception("The provided symmetric cipher provider is not instantiated.", new ArgumentNullException("symmetricCipherProvider")); } Person = new Entity.Person(Person, SCMS.Foundation.Security.EncryptionStatus.EncryptionStatusDecrypted, symmetricCipherProvider); Country = string.IsNullOrEmpty(Country) ? string.Empty : symmetricCipherProvider.DecryptData(Country); Subdivision = string.IsNullOrEmpty(Subdivision) ? string.Empty : symmetricCipherProvider.DecryptData(Subdivision); City = string.IsNullOrEmpty(City) ? string.Empty : symmetricCipherProvider.DecryptData(City); Address = string.IsNullOrEmpty(Address) ? string.Empty : symmetricCipherProvider.DecryptData(Address); ZIP = string.IsNullOrEmpty(ZIP) ? string.Empty : symmetricCipherProvider.DecryptData(ZIP); Phones = Phones == null ? null : Phones.Select(p => string.IsNullOrEmpty(p) ? string.Empty : symmetricCipherProvider.DecryptData(p)).ToList(); }
public IEnumerable <Phone> GetPhones() { return(Phones.Select(x => x.Phone)); }