예제 #1
0
        internal static bool TestCase()
        {
            NoConstructorSon value = new NoConstructorSon {
                Value = 1
            };
            string json = AutoCSer.JsonSerializer.Serialize(value);

            AutoCSer.Json.DeSerializeConfig parseConfig = new AutoCSer.Json.DeSerializeConfig {
                Constructor = checkConstructor
            };
            NoConstructor newValue = AutoCSer.JsonDeSerializer.DeSerialize <NoConstructor>(json, parseConfig);

            return(newValue != null && newValue.Value == 1);
        }
예제 #2
0
        internal static bool TestCase()
        {
            NoConstructorSon value = new NoConstructorSon {
                Value = 1
            };
            string xml = AutoCSer.Xml.Serializer.Serialize(value);

            AutoCSer.Xml.ParseConfig parseConfig = new AutoCSer.Xml.ParseConfig {
                Constructor = checkConstructor
            };
            NoConstructor newValue = AutoCSer.Xml.Parser.Parse <NoConstructor>(xml, parseConfig);

            return(newValue != null && newValue.Value == 1);
        }