public static Dictionary <string, Object> WriteDictionary(this object receiver, string modelName, DictionaryOutput output) { if (receiver == null) { return(null); } IObjectSerializer serializer = ObjectExtension.CreateSerializer("Dictionary"); DictionaryBuilder builder = new DictionaryBuilder(output); object writer = serializer.CreateCustomWriter(builder); SerializerUtil.WriteSerializer(serializer, writer, receiver, modelName, ObjectUtil.WriteSettings, QName.Toolkit, null); return(builder.Data); }
public DictionaryBuilder(DictionaryOutput output) { fOutput = output ?? DictionaryOutput.Default; fData = new Dictionary <string, object>(); }
public static Dictionary <string, Object> WriteDictionary(this object receiver, DictionaryOutput output) { return(WriteDictionary(receiver, null, output)); }