public static AddressSubaddressWasImportedFromCrab WithBoxNumber(this AddressSubaddressWasImportedFromCrab @event, BoxNumber boxNumber) { return(new AddressSubaddressWasImportedFromCrab( new CrabSubaddressId(@event.SubaddressId), new CrabHouseNumberId(@event.HouseNumberId), boxNumber, new CrabBoxNumberType(@event.BoxNumberType), new CrabLifetime(@event.BeginDateTime, @event.EndDateTime), new CrabTimestamp(@event.Timestamp), new CrabOperator(@event.Operator), @event.Modification, @event.Organisation)); }
private void When(AddressSubaddressWasImportedFromCrab @event) { IsSubaddress = true; _coupledHouseNumberId = new CrabHouseNumberId(@event.HouseNumberId); WhenCrabEventApplied(@event.Modification == CrabModification.Delete); }
private void When(AddressSubaddressWasImportedFromCrab @event) { _addressCollection.Add(@event); WhenCrabEventApplied(); }
public void Add(AddressSubaddressWasImportedFromCrab @event) => _importedSubaddressFromCrabs.Add(@event);