Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public DictionaryBuilder(DictionaryOutput output)
 {
     fOutput = output ?? DictionaryOutput.Default;
     fData   = new Dictionary <string, object>();
 }
Exemplo n.º 3
0
 public static Dictionary <string, Object> WriteDictionary(this object receiver,
                                                           DictionaryOutput output)
 {
     return(WriteDictionary(receiver, null, output));
 }