public override object Deserialize(IDictionary<string, object> dictionary, Type type, JavaScriptSerializer serializer) { PropertyLayoutSectionDefine plsd = new PropertyLayoutSectionDefine(); plsd.Name = DictionaryHelper.GetValue(dictionary, "name", string.Empty); plsd.Columns = DictionaryHelper.GetValue(dictionary, "columns", default(int)); plsd.DisplayName = DictionaryHelper.GetValue(dictionary, "displayName", string.Empty); plsd.DefaultRowHeight = DictionaryHelper.GetValue(dictionary, "defaultRowHeight", string.Empty); return new PropertyLayout(plsd); }
public override object Deserialize(IDictionary <string, object> dictionary, Type type, JavaScriptSerializer serializer) { PropertyLayoutSectionDefine plsd = new PropertyLayoutSectionDefine(); plsd.Name = DictionaryHelper.GetValue(dictionary, "name", string.Empty); plsd.Columns = DictionaryHelper.GetValue(dictionary, "columns", default(int)); plsd.DisplayName = DictionaryHelper.GetValue(dictionary, "displayName", string.Empty); plsd.DefaultRowHeight = DictionaryHelper.GetValue(dictionary, "defaultRowHeight", string.Empty); return(new PropertyLayout(plsd)); }
public void Deserialize(XElement node, XmlDeserializeContext context) { object pv = null; int objID = node.Attribute("v", -1); if (context.ObjectContext.TryGetValue(objID, out pv) == true) { this._LayoutSection = ((PropertyLayout)pv).Clone().LayoutSection; } else { this._LayoutSection = new PropertyLayoutSectionDefine(); this._LayoutSection.Deserialize(node, context); objID = node.Attribute("id", -1); if (objID > -1) { context.ObjectContext.Add(objID, this); } } }
public PropertyLayout(PropertyLayoutSectionDefine define) { this._LayoutSection = define; }