public void When(NewPropertyAddedToForm evt) { _writer.AddOrUpdate(evt.FormId, () => { var list = new FormPropertyList { FormId = evt.FormId }; var property = new FormPropertyList.Property { Id = evt.PropertyId, Name = evt.Name, Type = evt.Type, }; list.Properties.Add(property); return list; }, list => { if (list.Properties.Any(x => x.Id == evt.PropertyId)) return; var property = new FormPropertyList.Property { Id = evt.PropertyId, Type = evt.Type, Name = evt.Name }; list.Properties.Add(property); }); }
public PropertyInfoModel(FormInfo form, FormPropertyList allProps, PropertyData property) { Form = form; AllFormProperties = allProps; Property = property; }
public FormInfoModel(FormInfo form, FormPropertyList properties) { Form = form; Properties = properties; }