public void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info) { var s = (ColorSet)obj; info.SetProperty(GetSerializationRegistrationKey(s), "True"); // Register a property to note that this color set is already serialized. info.AddValue("Name", s._name); info.CreateArray("Colors", s._innerList.Length); foreach (NamedColor c in s) { info.CreateElement("e"); info.AddAttributeValue("Name", c.Name); info.SetNodeContent(c.Color.ToInvariantString()); info.CommitElement(); } info.CommitArray(); }
public void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info) { info.SetNodeContent(obj.ToString()); }
public virtual void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info) { var s = (FontX)obj; info.SetNodeContent(s._invariantDescriptionString); }
public void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info) { System.Drawing.Font s = (System.Drawing.Font)obj; info.SetNodeContent(sm_Converter.ConvertToInvariantString(s)); }