Enqueue() public method

public Enqueue ( System.Web.Caching.CacheItem item ) : void
item System.Web.Caching.CacheItem
return void
コード例 #1
0
        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++;
        }
コード例 #2
0
ファイル: Utils.cs プロジェクト: pmq20/mono_forked
        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++;
        }