Пример #1
0
        public void DeserializingADictionaryDerivedInstance()
        {
            var inst = DictionarySample.GetSampleInstance();

            var ser = new YAXSerializer(typeof(DictionarySample));

            string input = ser.Serialize(inst);

            DictionarySample deserializedInstance = (DictionarySample)ser.Deserialize(input);

            Assert.That(deserializedInstance, Is.Not.Null);
            Assert.IsTrue(deserializedInstance.Count == inst.Count,
                          "Expected Count: {0}. Actual Count: {1}",
                          inst.Count,
                          deserializedInstance.Count);
        }
Пример #2
0
 static void Main(string[] args)
 {
     TypesSample.Demo();
     TypeCastingSample.Demo();
     ReferenceParametersSample.Demo();
     ClassSample.Demo();
     StaticClassSample.Demo();
     ArgumentsSample.Demo();
     SimpleInheritance.Demo();
     InheritanceSample.Demo();
     SealedSample.Demo();
     AbstractSample.Demo();
     InterfaceInheritanceSample.Demo();
     InterfaceInheritanceDISample.Demo();
     ListSample.Demo();
     DictionarySample.Demo();
 }