public void WriteMapValues(object map, WriteItem valueWriter, Encoder encoder)
 {
     foreach (DictionaryEntry entry in ((IDictionary)map))
     {
         encoder.StartItem();
         encoder.WriteString(entry.Key.ToString());
         valueWriter(entry.Value, encoder);
     }
 }
Esempio n. 2
0
            public void WriteArrayValues(object array, WriteItem valueWriter, Encoder encoder)
            {
                var arrayInstance = (Array)array;

                for (int i = 0; i < arrayInstance.Length; i++)
                {
                    encoder.StartItem();
                    valueWriter(arrayInstance.GetValue(i), encoder);
                }
            }