public Task RegisterBirth(PersonAttributes props) { if (this.State.FirstName == null) { RaiseEvent(new PersonRegistered(props.FirstName, props.LastName, props.Gender)); return(ConfirmEvents()); } return(Task.CompletedTask); }
/// <summary> /// Used to make sure the attributes and their definitions match up. /// </summary> public void SortAttributeLists( ) { // first, sort the model's attributes FamilyAttributes.Sort(delegate(Dictionary <string, string> x, Dictionary <string, string> y) { if (int.Parse(x["attributeId"]) < int.Parse(y["attributeId"])) { return(-1); } return(1); }); PersonAttributes.Sort(delegate(Dictionary <string, string> x, Dictionary <string, string> y) { if (int.Parse(x["attributeId"]) < int.Parse(y["attributeId"])) { return(-1); } return(1); }); }
public PersonAttributes GetPersonAttributes() { return(PersonAttributes.FromJson(Attributes)); }
public void SetPersonAttributes(PersonAttributes value) { Attributes = value.ToJson(); }
public void SetPersonAttributes(PersonAttributes value) { Content = value.ToJson(); }
public Task RegisterBirth(PersonAttributes props) { return(RaiseStateEvent(new PersonRegistered(props.FirstName, props.LastName, props.Gender))); }