protected override void InnerSerialize(System.Xml.XmlWriter writer)
 {
     writer.WriteElementString("Count", _dataValue.Length.ToString());
     for (int i = 0; i < _dataValue.Length; i++)
     {
         ValueStructure.Serialize(writer, _dataValue[i]);
     }
 }
Beispiel #2
0
        public static StructurePack Pack(ValueStructure structure, Dictionary <Guid, Guid> signalMappings, Dictionary <Guid, Guid> busMappings)
        {
            StringBuilder     sb       = new StringBuilder();
            XmlWriterSettings settings = new XmlWriterSettings();

            settings.Encoding           = Context.DefaultEncoding;
            settings.Indent             = false;
            settings.ConformanceLevel   = ConformanceLevel.Fragment;
            settings.NewLineHandling    = NewLineHandling.Entitize;
            settings.OmitXmlDeclaration = true;
            XmlWriter writer = XmlWriter.Create(sb, settings);

            ValueStructure.Serialize(writer, structure);
            writer.Flush();
            writer.Close();
            return(new StructurePack(sb.ToString()));
        }