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); }
public object Get(ComplexClassForOpenRastaSerializationTests data) { ObjectSerializer serializer = new ObjectSerializer(data.GetType()); ObjectToStringPropertyVisitor visitor = new ObjectToStringPropertyVisitor(); serializer.Serialize(data, visitor); return(visitor.Result); }