Ejemplo n.º 1
0
                public static void SerializeList(String key, List <double> list, Serializer serializer)
                {
                    Marshaller marshaller = new Marshaller();

                    marshaller.MarshallList(list);
                    serializer.Serialize(key, marshaller.GetStorage());
                }
Ejemplo n.º 2
0
            public void Serialize(Serializer serializer)
            {
                serializer.Serialize("maxSolarOutput", _maxHistoricalOutput);
                Marshaller marshaller = new Marshaller();

                marshaller.MarshallList(_pylons.Keys);
                serializer.Serialize("pylonKeys", marshaller.GetStorage());
            }
Ejemplo n.º 3
0
                public override void DoTests()
                {
                    Marshaller marshaller = new Marshaller();

                    marshaller.Marshall("string1");
                    marshaller.Marshall(1);
                    marshaller.Marshall(10.1);
                    AssertEqual(marshaller.GetStorage(), "string1;1;10.1;", "Wrong marshalling");
                    marshaller = new Marshaller();
                    marshaller.MarshallList(new List <double> {
                        1, 10.1
                    });
                    AssertEqual(marshaller.GetStorage(), "2;1;10.1;", "Wrong marshalling of list");
                }