Example #1
0
        public void DictionaryTest2()
        {
            var a = new DerivedA();

            a.SetValues();

            var serializedData = DictionarySerializer.Serialize(a);
            var a1             = DictionarySerializer.Deserialize <Interface>(serializedData);
        }
Example #2
0
        public void DocumentTest2()
        {
            var a = new DerivedA();

            a.SetValues();

            var doc = DocumentSerializer.Serialize(a);

            var b = DocumentSerializer.Deserialize <Interface>(doc);
        }
Example #3
0
        public void SetValues()
        {
            guid = Guid.NewGuid();

            a_private = "private string";

            a = "this is a string";

            a_protected = "this is a protected string";

            n = 3;

            listOfStrings = new List <string> {
                "a", "bc", "def"
            };

            listOfFloats = new List <float> {
                0.1f, 0.2f, 32.2f
            };

            arrayOfFloats = new[] { 1, 2, 3.5f };

            arrayOfStrings = new[] { "abc", "def" };

            b = new TestClassB();
            b.SetValues();

            abstractClasses = new List <AbstractClass>();
            var da = new DerivedA();

            da.SetValues();
            abstractClasses.Add(da);
            var db = new DerivedB();

            db.SetValues();
            abstractClasses.Add(db);

            interfaces = new List <Interface>();
            var ia = new DerivedA();

            ia.SetValues();
            interfaces.Add(ia);
            var ib = new DerivedB();

            ib.SetValues();
            interfaces.Add(ib);

            listOfLists = new List <List <int> >
            {
                new List <int> {
                    1, 2, 3
                },
                new List <int> {
                    5, 6, 7
                }
            };

            ignoreMe = "this should be ignored";

            onlyForPrivileged = "can you read that?";

            onlyForSuperPrivileged = "how about that?";

            forBoth = "or that?";
        }