internal static void WriteString(Stream s, string str) { WriteInt32(s, str.Length); foreach (char c in str) { s.WriteByte((byte) (c & 0xFF)); s.WriteByte((byte) ((c >> 8) & 0xFF)); } }
private void Store(Stream s, Hashtable table) { Utils.WriteInt32(s, table.Count); foreach (DictionaryEntry entry in table) { Utils.WriteString(s, (string)entry.Key); persister.Write(s, (ICacheItem)entry.Value); } }