示例#1
0
        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);
                });
        }
示例#2
0
 public PropertyInfoModel(FormInfo form, FormPropertyList allProps, PropertyData property)
 {
     Form              = form;
     AllFormProperties = allProps;
     Property          = property;
 }
示例#3
0
 public FormInfoModel(FormInfo form, FormPropertyList properties)
 {
     Form       = form;
     Properties = properties;
 }