static private WriteString ( Stream s, string str ) : void | ||
s | Stream | |
str | string | |
return | void |
private void Store(Stream s, Dictionary <string, ICacheItem> table) { UtilityMethods.WriteInt32(s, table.Count); foreach (KeyValuePair <string, ICacheItem> entry in table) { UtilityMethods.WriteString(s, (string)entry.Key); persister.Write(s, (ICacheItem)entry.Value); } }
public override void Write(Stream outputStream, ICacheItem cacheItem) { ResponseCacheItem item = (ResponseCacheItem)cacheItem; StringBuilder result = new StringBuilder(); result.Append(item.Url.AbsoluteUri + "\n"); result.Append(item.CreationTime.Ticks.ToString(System.Globalization.NumberFormatInfo.InvariantInfo)); UtilityMethods.WriteString(outputStream, result.ToString()); UtilityMethods.WriteString(outputStream, item.Response); }