Beispiel #1
0
        public ValueStructure Unpack(Context context, Dictionary <Guid, Signal> signals, Dictionary <Guid, Bus> buses)
        {
            StringReader sr     = new StringReader(_serializedXmlFragment);
            XmlReader    reader = XmlReader.Create(sr);

            return(ValueStructure.Deserialize(context, reader));
        }
        private static VectorValue <TScalar> InnerDeserialize(Context context, System.Xml.XmlReader reader)
        {
            int cnt = int.Parse(reader.ReadElementString("Count"));

            TScalar[] values = new TScalar[cnt];
            for (int i = 0; i < cnt; i++)
            {
                values[i] = (TScalar)ValueStructure.Deserialize(context, reader);
            }
            return(new VectorValue <TScalar>(values));
        }