public ImportHouseNumberFromCrab( CrabHouseNumberId houseNumberId, CrabStreetNameId streetNameId, HouseNumber houseNumber, GrbNotation grbNotation, CrabLifetime lifetime, CrabTimestamp timestamp, CrabOperator @operator, CrabModification?modification, CrabOrganisation?organisation) { HouseNumberId = houseNumberId; StreetNameId = streetNameId; HouseNumber = houseNumber; GrbNotation = grbNotation; Lifetime = lifetime; Timestamp = timestamp; Operator = @operator; Modification = modification; Organisation = organisation; }
public void ImportHouseNumberFromCrab( CrabHouseNumberId houseNumberId, CrabStreetNameId crabStreetNameId, HouseNumber houseNumber, GrbNotation grbNotation, CrabLifetime crabLifetime, CrabTimestamp timestamp, CrabOperator @operator, CrabModification?modification, CrabOrganisation?organisation) { if (IsRemoved && !IsSubaddress) { throw new AddressRemovedException($"Cannot change removed address for address id {_addressId}"); } if (!(_coupledHouseNumberId != null && _coupledHouseNumberId != houseNumberId) && !IsRemoved) { if (modification == CrabModification.Delete) { ApplyChange(new AddressWasRemoved(_addressId)); } else { ApplyHouseNumberChange(crabStreetNameId, houseNumber, modification); EvaluateRetirement(crabLifetime, modification); } } ApplyChange(new AddressHouseNumberWasImportedFromCrab( houseNumberId, crabStreetNameId, houseNumber, grbNotation, crabLifetime, timestamp, @operator, modification, organisation)); }
public AddressHouseNumberWasImportedFromCrab( CrabHouseNumberId houseNumberId, CrabStreetNameId streetNameId, HouseNumber houseNumber, GrbNotation grbNotation, CrabLifetime lifetime, CrabTimestamp timestamp, CrabOperator @operator, CrabModification?modification, CrabOrganisation?organisation) { HouseNumberId = houseNumberId; StreetNameId = streetNameId; HouseNumber = houseNumber; GrbNotation = grbNotation; Begin = lifetime.BeginDateTime; End = lifetime.EndDateTime; Timestamp = timestamp; Operator = @operator; Modification = modification; Organisation = organisation; }