void IXmlSerializable.WriteXml(XmlWriter writer) { writer.WriteAttributeString("Name", this.TargetTable.Name); writer.WriteAttributeString("CategoryPath", this.TargetTable.CategoryPath); writer.WriteAttributeString("BaseNamespace", this.TargetTable.DataSet.Namespace); this.template.WriteXml(writer, XmlWriteMode.DiffGram); this.TargetTable.DataSet.WriteXmlSchema(writer); this.TargetTable.DataSet.WriteXml(writer); XmlSerializerUtility.Write(writer, this.Types); }
private void Serialize(XmlWriter writer, IReadOnlyDictionary <string, object> properties) { writer.WriteStartElement(SerializableElement); foreach (var item in properties) { writer.WriteStartElement("item"); writer.WriteAttributeString("name", item.Key); writer.WriteAttributeString("type", item.Value.GetType().AssemblyQualifiedName); XmlSerializerUtility.Write(writer, item.Value); writer.WriteEndElement(); } writer.WriteEndElement(); }