static private ReadInt32 ( Stream s ) : int | ||
s | Stream | |
Résultat | int |
private Dictionary <string, ICacheItem> Load(Stream s) { Dictionary <string, ICacheItem> table = new Dictionary <string, ICacheItem>(); int itemCount = UtilityMethods.ReadInt32(s); for (int i = 0; i < itemCount; i++) { try { string key = UtilityMethods.ReadString(s); ICacheItem val = persister.Read(s); if (val == null) // corrupt cache file { return(table); } table[key] = val; } catch (IOException) { return(table); } } return(table); }