public Serialize ( object data, IPropertyVisitor visitor, |
||
data | object | |
visitor | IPropertyVisitor | |
settings | ||
리턴 | void |
public object Get(ComplexClassForOpenRastaSerializationTests data) { ObjectSerializer serializer = new ObjectSerializer(data.GetType()); ObjectToStringPropertyVisitor visitor = new ObjectToStringPropertyVisitor(); serializer.Serialize(data, visitor); return visitor.Result; }
public static Dictionary<string, string> ConvertObjectPropertiesToDictionary(object src) { Dictionary<string, string> result = new Dictionary<string, string>(); if (src == null) return result; Type t = src.GetType(); ObjectSerializer Serializer = new ObjectSerializer(t); DictionaryConverterPropertyVisitor visitor = new DictionaryConverterPropertyVisitor(); Serializer.Serialize(src, visitor); return visitor.Result; }
public static Hashtable ConvertObjectPropertiesToHashtable(object src) { Hashtable result = new Hashtable(); if (src == null) return result; Type t = src.GetType(); ObjectSerializer Serializer = new ObjectSerializer(t); HashtableConverterPropertyVisitor visitor = new HashtableConverterPropertyVisitor(); Serializer.Serialize(src, visitor); return visitor.Result; }