Ejemplo n.º 1
0
 public static void Serialize(Stream bytes, Dictionary <TKey, TValue> instance, Serializer <TKey> keySerialization, Serializer <TValue> valueSerialization)
 {
     Int32Proxy.Serialize(bytes, instance.Count);
     foreach (KeyValuePair <TKey, TValue> current in instance)
     {
         keySerialization(bytes, current.Key);
         valueSerialization(bytes, current.Value);
     }
 }
Ejemplo n.º 2
0
 public static void SerializeArray(Stream bytes, byte[] instance)
 {
     Int32Proxy.Serialize(bytes, instance.Length);
     bytes.Write(instance, 0, instance.Length);
 }