protected CreditCard(IVoca cardholder, DateTime?openedDate, DateTime?expiryDate) { CardHolderSince = openedDate.GetValueOrDefault(DateTime.UtcNow); if (expiryDate == null) { ExpDate = Etx.RandomDate(Etx.RandomInteger(4, 6), null); ExpDate = new DateTime(ExpDate.Year, ExpDate.Month, Etx.RandomCoinToss() ? 1 : 15); } else { ExpDate = expiryDate.Value; } if (cardholder != null) { var fname = (cardholder.GetName(KindsOfNames.First) ?? String.Empty).ToUpper(); var lname = (cardholder.GetName(KindsOfNames.Surname) ?? String.Empty).ToUpper(); CardHolderName = string.IsNullOrWhiteSpace(fname) && string.IsNullOrWhiteSpace(lname) ? (cardholder.GetName(KindsOfNames.Legal) ?? String.Empty).ToUpper() : String.Join(" ", fname, lname); } Cvv = $"{Etx.RandomInteger(7, 999),3:D3}"; Number = GetRandomCardNumber(); }
protected VitalRecord(IVoca personName) { if (personName == null) { return; } PersonFullName = NfString.DistillSpaces( string.Join(" ", personName.GetName(KindsOfNames.First), personName.GetName(KindsOfNames.Surname))); if (string.IsNullOrWhiteSpace(PersonFullName)) { PersonFullName = personName.GetName(KindsOfNames.Legal); } }
public AmericanDeathCert(MannerOfDeath mannerOfDeath, IVoca personName) : this(mannerOfDeath, (string)null) { if (personName == null) { return; } PersonFullName = NfString.DistillSpaces( string.Join(" ", personName.GetName(KindsOfNames.First), personName.GetName(KindsOfNames.Middle), personName.GetName(KindsOfNames.Surname))); if (string.IsNullOrWhiteSpace(PersonFullName)) { PersonFullName = personName.GetName(KindsOfNames.Legal); } }
public AmericanBirthCert(IVoca personName) : base((IVoca)null) { if (personName == null) { return; } PersonFullName = NfString.DistillSpaces( string.Join(" ", personName.GetName(KindsOfNames.First), personName.GetName(KindsOfNames.Middle), personName.GetName(KindsOfNames.Surname))); if (string.IsNullOrWhiteSpace(PersonFullName)) { PersonFullName = personName.GetName(KindsOfNames.Legal); } }