Dequeue() публичный Метод

public Dequeue ( ) : System.Web.Caching.CacheItem
Результат System.Web.Caching.CacheItem
        public static void FormatDequeue(this StringBuilder sb, string indent, PriorityQueueState qs)
        {
            CacheItem item = qs.Dequeue();

            sb.Append(indent);
            var ti = new CacheItemPriorityQueueTestItem()
            {
                Operation      = QueueOperation.Dequeue,
                QueueCount     = qs.Queue.Count,
                OperationCount = qs.DequeueCount
            };

            if (item != null)
            {
                ti.Guid       = item.Guid.ToString();
                ti.IsDisabled = item.Disabled;
            }
            else
            {
                ti.IsNull = true;
            }

            sb.AppendFormat("\"{0}\",", ti.Serialize());
            sb.AppendLine();

            qs.DequeueCount++;
        }
Пример #2
0
        public static void FormatDequeue(this StreamWriter sw, PriorityQueueState qs)
        {
            CacheItem item = qs.Dequeue();
            var       ti   = new CacheItemPriorityQueueTestItem()
            {
                Operation          = QueueOperation.Dequeue,
                QueueCount         = qs.Queue.Count,
                OperationCount     = qs.DequeueCount,
                PriorityQueueIndex = item.PriorityQueueIndex
            };

            if (item != null)
            {
                ti.Guid       = item.Guid.ToString();
                ti.IsDisabled = item.Disabled;
            }
            else
            {
                ti.IsNull = true;
            }

            sw.WriteLine(ti.Serialize());
            qs.DequeueCount++;
        }