public override IDictionary <string, object> Serialize(object obj, JavaScriptSerializer serializer) { Dictionary <string, object> dictionary = new Dictionary <string, object>(); PropertyLayout pl = (PropertyLayout)obj; DictionaryHelper.AddNonDefaultValue <string, object>(dictionary, "name", pl.LayoutSection.Name); DictionaryHelper.AddNonDefaultValue <string, object>(dictionary, "columns", pl.LayoutSection.Columns); DictionaryHelper.AddNonDefaultValue <string, object>(dictionary, "displayName", pl.LayoutSection.DisplayName); DictionaryHelper.AddNonDefaultValue <string, object>(dictionary, "defaultRowHeight", pl.LayoutSection.DefaultRowHeight); return(dictionary); }
public void Serialize(XElement node, XmlSerializeContext context) { PropertyLayout pl = this.Clone(); int objID = 0; if (context.ObjectContext.TryGetValue(pl, out objID) == false) { objID = context.CurrentID; context.ObjectContext.Add(pl, objID); node.SetAttributeValue("id", context.CurrentID++); pl.LayoutSection.Serialize(node, context); } else { node.SetAttributeValue("v", objID); } }
public PropertyLayout Clone() { PropertyLayout newValue = new PropertyLayout(this._LayoutSection); return newValue; }
public PropertyLayout Clone() { PropertyLayout newValue = new PropertyLayout(this._LayoutSection); return(newValue); }