public Peek ( ) : System.Web.Caching.CacheItem | ||
return | System.Web.Caching.CacheItem |
public static void FormatPeek(this StringBuilder sb, string indent, PriorityQueueState qs) { CacheItem item = qs.Peek(); sb.Append(indent); var ti = new CacheItemPriorityQueueTestItem() { Operation = QueueOperation.Peek, QueueCount = qs.Queue.Count, OperationCount = qs.PeekCount }; if (item != null) { ti.Guid = item.Guid.ToString(); ti.IsDisabled = item.Disabled; } else { ti.IsNull = true; } sb.AppendFormat("\"{0}\",", ti.Serialize()); sb.AppendLine(); qs.PeekCount++; }
public static void FormatEnqueue(this StringBuilder sb, string indent, PriorityQueueState qs, List <CacheItem> list, int index) { qs.Enqueue(list [index]); sb.Append(indent); var ti = new CacheItemPriorityQueueTestItem() { Operation = QueueOperation.Enqueue, QueueCount = qs.Queue.Count, ListIndex = index, Guid = qs.Peek().Guid.ToString(), OperationCount = qs.EnqueueCount }; sb.AppendFormat("\"{0}\",", ti.Serialize()); sb.AppendLine(); qs.EnqueueCount++; }
public static void FormatEnqueue(this StreamWriter sw, PriorityQueueState qs, List <CacheItem> list, int index) { CacheItem item = list [index]; qs.Enqueue(item); var ti = new CacheItemPriorityQueueTestItem() { Operation = QueueOperation.Enqueue, QueueCount = qs.Queue.Count, ListIndex = index, Guid = qs.Peek().Guid.ToString(), OperationCount = qs.EnqueueCount, PriorityQueueIndex = item.PriorityQueueIndex }; sw.WriteLine(ti.Serialize()); qs.EnqueueCount++; }
public static void FormatPeek(this StreamWriter sw, PriorityQueueState qs) { CacheItem item = qs.Peek(); var ti = new CacheItemPriorityQueueTestItem() { Operation = QueueOperation.Peek, QueueCount = qs.Queue.Count, OperationCount = qs.PeekCount, PriorityQueueIndex = item.PriorityQueueIndex }; if (item != null) { ti.Guid = item.Guid.ToString(); ti.IsDisabled = item.Disabled; } else { ti.IsNull = true; } sw.WriteLine(ti.Serialize()); qs.PeekCount++; }