public void AddAddress(string value, bool isHQ) { MaybeResetHeadQuartersFlag(isHQ); var address = isHQ ? CompanyAddress.HeadQuarter(value) : CompanyAddress.Subsidiary(value); Addresses.Add(address); }
public Company(string name, string address, string vat) { if (string.IsNullOrWhiteSpace(address)) { throw new ArgumentNullException(address); } if (string.IsNullOrWhiteSpace(vat)) { throw new ArgumentNullException(vat); } Name = name; Vat = vat; Addresses.Add(CompanyAddress.HeadQuarter(address)); }