コード例 #1
0
        protected string Serialize(object data, ObjectSerializerSettings settings = null)
        {
            ObjectSerializer serializer           = new ObjectSerializer(data.GetType());
            ObjectToStringPropertyVisitor visitor = new ObjectToStringPropertyVisitor();

            serializer.Serialize(data, visitor, settings);
            return(visitor.Result);
        }
コード例 #2
0
        public object Get(ComplexClassForOpenRastaSerializationTests data)
        {
            ObjectSerializer serializer           = new ObjectSerializer(data.GetType());
            ObjectToStringPropertyVisitor visitor = new ObjectToStringPropertyVisitor();

            serializer.Serialize(data, visitor);
            return(visitor.Result);
        }