コード例 #1
0
        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);
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
        public PropertyLayout Clone()
        {
            PropertyLayout newValue = new PropertyLayout(this._LayoutSection);

            return newValue;
        }
コード例 #4
0
        public PropertyLayout Clone()
        {
            PropertyLayout newValue = new PropertyLayout(this._LayoutSection);

            return(newValue);
        }