public MunicipalityWasRetired( MunicipalityId municipalityId, RetirementDate retirementDate) { MunicipalityId = municipalityId; RetirementDate = retirementDate; }
public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append($"{{ Id = {Id}"); sb.Append($", Name = {Name}"); sb.Append($", DepartmentId = {DepartmentID}"); sb.Append($", SectionId = {SectionID}"); sb.Append($", EmailAddress = {EmailAddress}"); sb.Append($", RetirementDate = {RetirementDate?.ToShortDateString()}"); sb.Append(" }"); return(sb.ToString()); }
private void When(MunicipalityWasCorrectedToRetired @event) { _status = MunicipalityStatus.Retired; _retiredDate = new RetirementDate(@event.RetirementDate); }
public void Retire(RetirementDate date) { ApplyChange(new MunicipalityWasRetired(_municipalityId, date)); }