#endif
[assembly: InternalsVisibleTo ("SystemWebTestShim, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
++[assembly: InternalsVisibleTo ("System.Web_test_net_2_0, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
++[assembly: InternalsVisibleTo ("System.Web_test_net_4_0, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
// Resources
++2010-02-03 Marek Habersack <mhabersack@novell.com>
++
++ * AssemblyInfo.cs: added back InternalsVisibleTo for the test
++ assembly - it's needed to access CacheItemPriorityQueue
++
2009-07-07 Raja R Harinath <harinath@hurrynot.org>
* AssemblyInfo.cs: Don't make internals visible to System.Web_test.
CLASSLIB_DIR = $(topdir)/class/lib/$(PROFILE)
--STANDALONE_RUNNER_SUPPORT_MCS_FLAGS = -d:STANDALONE_TEST -debug:full -r:System.Web.dll -r:nunit.framework.dll
++STANDALONE_RUNNER_SUPPORT_MCS_FLAGS = $(LIB_MCS_FLAGS) $(PROFILE_MCS_FLAGS) -d:STANDALONE_TEST -debug:full -r:System.Web.dll -r:nunit.framework.dll
STANDALONE_RUNNER_SUPPORT_ASSEMBLY = $(CLASSLIB_DIR)/standalone-runner-support.dll
STANDALONE_RUNNER_SUPPORT_MAKEFRAG = $(depsdir)/$(PROFILE)_standalone-runner-support.dll.makefrag
--STANDALONE_TEST_MCS_FLAGS = -debug:full -r:$(STANDALONE_RUNNER_SUPPORT_ASSEMBLY) -r:System.Web.dll -r:nunit.framework.dll
++STANDALONE_TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) $(PROFILE_MCS_FLAGS) -debug:full -r:$(STANDALONE_RUNNER_SUPPORT_ASSEMBLY) -r:System.Web.dll -r:nunit.framework.dll
STANDALONE_TEST_ASSEMBLY = System.Web_standalone_test_$(PROFILE).dll
STANDALONE_TEST_MAKEFRAG = $(depsdir)/$(STANDALONE_TEST_ASSEMBLY).makefrag
CacheItem ret = null;
if (!cache.TryGetValue (key, out ret))
return null;
++ if (timedItems != null)
++ timedItems.OnItemDisable (ret);
++
ret.Disabled = true;
cache.Remove (key);
expirationTimerPeriod = 4294967294;
else
expirationTimerPeriod = remaining;
--
++
if (expirationTimer == null)
expirationTimer = new Timer (new TimerCallback (ExpireItems), null, expirationTimerPeriod, expirationTimerPeriod);
-- else if (expirationTimerPeriod > remaining)
++ else
expirationTimer.Change (expirationTimerPeriod, expirationTimerPeriod);
timedItems.Enqueue (item);
{
DateTime now = DateTime.Now;
CacheItem item = timedItems.Peek ();
++ bool locked = false;
++
++ try {
++ cacheLock.EnterWriteLock ();
++ locked = true;
++
++ while (item != null) {
++ if (!item.Disabled && item.ExpiresAt > now.Ticks)
++ break;
++ if (item.Disabled) {
++ item = timedItems.Dequeue ();
++ continue;
++ }
-- while (item != null) {
-- if (!item.Disabled && item.ExpiresAt > now.Ticks)
-- break;
-- if (item.Disabled) {
item = timedItems.Dequeue ();
-- continue;
++ if (!NeedsUpdate (item, CacheItemUpdateReason.Expired, true))
++ Remove (item.Key, CacheItemRemovedReason.Expired, false, true);
++ item = timedItems.Peek ();
}
--
-- item = timedItems.Dequeue ();
-- if (!NeedsUpdate (item, CacheItemUpdateReason.Expired, true))
-- Remove (item.Key, CacheItemRemovedReason.Expired, true, true);
-- item = timedItems.Peek ();
++ } finally {
++ if (locked)
++ cacheLock.ExitWriteLock ();
}
if (item != null) {
long remaining = Math.Max (0, (long)(item.AbsoluteExpiration - now).TotalMilliseconds);
-- if (expirationTimerPeriod > remaining) {
++ if (expirationTimerPeriod != remaining && remaining > 0) {
expirationTimerPeriod = remaining;
expirationTimer.Change (expirationTimerPeriod, expirationTimerPeriod);
}
return;
}
--
++
expirationTimer.Change (Timeout.Infinite, Timeout.Infinite);
expirationTimerPeriod = 0;
}
public CacheDependency (string[] filenames, string[] cachekeys, CacheDependency dependency, DateTime start)
{
-- if (filenames != null) {
-- watchers = new FileSystemWatcher [filenames.Length];
-- for (int n=0; n<filenames.Length; n++) {
++ int flen = filenames != null ? filenames.Length : 0;
++
++ if (flen > 0) {
++ watchers = new FileSystemWatcher [flen];
++ string filename;
++
++ for (int n = 0; n < flen; n++) {
++ filename = filenames [n];
++ if (String.IsNullOrEmpty (filename))
++ continue;
++
FileSystemWatcher watcher = new FileSystemWatcher ();
-- if (Directory.Exists (filenames [n])) {
-- watcher.Path = filenames [n];
-- } else {
-- string parentPath = Path.GetDirectoryName (filenames [n]);
++ if (Directory.Exists (filename))
++ watcher.Path = filename;
++ else {
++ string parentPath = Path.GetDirectoryName (filename);
if (parentPath != null && Directory.Exists (parentPath)) {
watcher.Path = parentPath;
-- watcher.Filter = Path.GetFileName (filenames [n]);
++ watcher.Filter = Path.GetFileName (filename);
} else
continue;
}
public virtual string GetUniqueID ()
{
-- StringBuilder sb = new StringBuilder ();
++ var sb = new StringBuilder ();
++
lock (locker) {
if (watchers != null)
foreach (FileSystemWatcher fsw in watchers)
if (fsw != null && fsw.Path != null && fsw.Path.Length != 0)
-- sb.AppendFormat ("_{0}", fsw.Path);
++ sb.Append ("_" + fsw.Path);
}
if (cachekeys != null)
foreach (string key in cachekeys)
-- sb.AppendFormat ("_{0}", key);
++ sb.AppendFormat ("_" + key);
return sb.ToString ();
}
bool DoOnChanged ()
{
-- if (DateTime.Now < start)
++ DateTime now = DateTime.Now;
++
++ if (now < start)
return false;
hasChanged = true;
-- utcLastModified = DateTime.UtcNow;
++ utcLastModified = now.ToUniversalTime ();
DisposeWatchers ();
if (cache != null)
{
OnDependencyChanged (sender, e);
}
--
--
}
}
public DateTime LastChange;
public long ExpiresAt;
public bool Disabled;
--
public Timer Timer;
++ public Guid Guid;
++
++ public CacheItem ()
++ {
++ Guid = Guid.NewGuid ();
++ }
++
++ public override string ToString ()
++ {
++ return String.Format ("CacheItem [{0}]\n[{1}][{2}][{3}]", this.Guid, Key, Disabled, ExpiresAt > 0 ? new DateTime (ExpiresAt).ToString () : "0");
++ }
}
}
//
--// System.Web.Caching.CacheItem
--//
// Author(s):
// Marek Habersack <mhabersack@novell.com>
//
--// (C) 2009 Novell, Inc (http://novell.com)
++// (C) 2009-2010 Novell, Inc (http://novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
++using System.Collections.Generic;
++using System.IO;
using System.Text;
using System.Threading;
++using System.Xml;
namespace System.Web.Caching
{
-- sealed class CacheItemPriorityQueue
++ sealed partial class CacheItemPriorityQueue
{
-- sealed class Node
-- {
-- public CacheItem Data;
++ const int INITIAL_HEAP_SIZE = 32;
++ const int HEAP_RESIZE_THRESHOLD = 8192;
-- public Node Left;
-- public Node Right;
-- public Node Parent;
-- public Node Next;
-- public Node Prev;
++ CacheItem[] heap;
++ int heapSize = 0;
++ int heapCount = 0;
++ ReaderWriterLockSlim queueLock;
-- public CacheItem SwapData (CacheItem newData)
-- {
-- CacheItem ret = Data;
-- Data = newData;
--
-- return ret;
-- }
++ public int Count {
++ get { return heapCount; }
++ }
-- public Node (CacheItem data)
-- {
-- Data = data;
-- }
++ public int Size {
++ get { return heapSize; }
}
-- Node root;
-- Node lastAdded;
-- Node firstParent;
-- Node lastParent;
--
--#if SYSTEMCORE_DEP
-- ReaderWriterLockSlim queueLock;
--#endif
--
public CacheItemPriorityQueue ()
{
--#if SYSTEMCORE_DEP
queueLock = new ReaderWriterLockSlim ();
--#endif
++ InitDebugMode ();
++ }
++
++ CacheItem[] GetHeapWithGrow ()
++ {
++ if (heap == null) {
++ heap = new CacheItem [INITIAL_HEAP_SIZE];
++ heapSize = INITIAL_HEAP_SIZE;
++ heapCount = 0;
++ return heap;
++ }
++
++ if (heapCount >= heapSize) {
++ heapSize <<= 1;
++ Array.Resize <CacheItem> (ref heap, heapSize);
++ }
++
++ return heap;
++ }
++
++ CacheItem[] GetHeapWithShrink ()
++ {
++ if (heap == null)
++ return null;
++
++ if (heapSize > HEAP_RESIZE_THRESHOLD) {
++ int halfTheSize = heapSize >> 1;
++
++ if (heapCount < halfTheSize)
++ Array.Resize <CacheItem> (ref heap, halfTheSize + (heapCount / 3));
++ }
++
++ return heap;
}
public void Enqueue (CacheItem item)
if (item == null)
return;
--#if SYSTEMCORE_DEP
bool locked = false;
++ CacheItem[] heap;
++
try {
queueLock.EnterWriteLock ();
locked = true;
--#endif
-- Node node = new Node (item);
-- if (root == null) {
-- root = lastAdded = lastParent = firstParent = node;
-- return;
-- }
--
-- if (lastParent.Left != null && lastParent.Right != null) {
-- lastParent = lastParent.Next;
-- if (lastParent == null) {
-- lastParent = firstParent = firstParent.Left;
-- lastAdded = null;
--
-- if (lastParent == null) {
-- lastParent = root;
-- firstParent = root;
-- }
-- }
-- }
--
-- node.Parent = lastParent;
-- if (lastParent.Left == null)
-- lastParent.Left = node;
-- else
-- lastParent.Right = node;
--
-- if (lastAdded != null) {
-- lastAdded.Next = node;
-- node.Prev = lastAdded;
-- }
--
-- lastAdded = node;
-- BubbleUp (node);
--#if SYSTEMCORE_DEP
++ heap = GetHeapWithGrow ();
++ heap [heapCount++] = item;
++ BubbleUp (heap);
++
++ AddSequenceEntry (item, EDSequenceEntryType.Enqueue);
} finally {
if (locked)
queueLock.ExitWriteLock ();
}
--#endif
}
public CacheItem Dequeue ()
{
CacheItem ret = null;
--#if SYSTEMCORE_DEP
++ CacheItem[] heap;
bool locked = false;
++ int index;
++
try {
queueLock.EnterWriteLock ();
locked = true;
--#endif
-- if (root == null)
++ heap = GetHeapWithShrink ();
++ if (heap == null || heapCount == 0)
return null;
--
-- if (root.Left == null && root.Right == null) {
-- ret = root.Data;
-- root = lastAdded = firstParent = lastParent = null;
-- if (ret.Disabled)
-- return null;
--
-- return ret;
-- }
--
-- ret = root.Data;
-- do {
-- Node last = lastAdded;
-- if (last == null)
-- return null;
++ ret = heap [0];
++ index = --heapCount;
++ heap [0] = heap [index];
++ heap [index] = null;
-- if (last.Prev == null) {
-- Node parent = last.Parent;
-- while (true) {
-- if (parent.Next == null)
-- break;
-- parent = parent.Next;
-- }
-- lastAdded = parent;
-- } else {
-- lastAdded = last.Prev;
-- lastAdded.Next = null;
-- }
++ if (heapCount > 0)
++ BubbleDown (heap);
-- if (last.Parent.Left == last)
-- last.Parent.Left = null;
-- else
-- last.Parent.Right = null;
--
-- root.Data = last.Data;
-- BubbleDown (root);
-- } while (ret.Disabled);
--#if SYSTEMCORE_DEP
++ AddSequenceEntry (ret, EDSequenceEntryType.Dequeue);
++ return ret;
} finally {
if (locked)
queueLock.ExitWriteLock ();
}
--#endif
-- return ret;
}
public CacheItem Peek ()
{
--#if SYSTEMCORE_DEP
bool locked = false;
++ CacheItem ret;
++
try {
queueLock.EnterReadLock ();
locked = true;
--#endif
-- if (root == null)
++ if (heap == null || heapCount == 0)
return null;
--#if SYSTEMCORE_DEP
++
++ ret = heap [0];
++ AddSequenceEntry (ret, EDSequenceEntryType.Peek);
++
++ return ret;
} finally {
if (locked)
queueLock.ExitReadLock ();
}
--#endif
-- return root.Data;
}
-- void BubbleDown (Node item)
-- {
-- if (item == null || (item.Left == null && item.Right == null))
-- return;
--
-- if (item.Left == null)
-- SwapBubbleDown (item, item.Right);
-- else if (item.Right == null)
-- SwapBubbleDown (item, item.Left);
-- else {
-- if (item.Left.Data.ExpiresAt < item.Right.Data.ExpiresAt)
-- SwapBubbleDown (item, item.Left);
-- else
-- SwapBubbleDown (item, item.Right);
-- }
-- }
--
-- void SwapBubbleDown (Node item, Node otherItem)
++ void BubbleDown (CacheItem[] heap)
{
-- if (otherItem.Data.ExpiresAt < item.Data.ExpiresAt) {
-- item.Data = otherItem.SwapData (item.Data);
-- BubbleDown (otherItem);
++ int index = 0;
++ int left = 1;
++ int right = 2;
++ CacheItem item = heap [0];
++ int selected = (right < heapCount && heap [right].ExpiresAt < heap [left].ExpiresAt) ? 2 : 1;
++
++ while (selected < heapCount && heap [selected].ExpiresAt < item.ExpiresAt) {
++ heap [index] = heap [selected];
++ index = selected;
++ left = (index << 1) + 1;
++ right = left + 1;
++ selected = right < heapCount && heap [right].ExpiresAt < heap [left].ExpiresAt ? right : left;
}
++ heap [index] = item;
}
-- void BubbleUp (Node item)
++ void BubbleUp (CacheItem[] heap)
{
-- if (item == null || item.Data == null)
-- return;
--
-- Node parent = item.Parent;
-- if (parent == null)
-- return;
++ int index, parentIndex;
++ CacheItem parent, item;
-- if (item.Data.ExpiresAt > parent.Data.ExpiresAt)
++ if (heapCount <= 1)
return;
--
-- item.Data = parent.SwapData (item.Data);
-- BubbleUp (parent);
-- }
--
-- public string GetDotScript ()
-- {
-- StringBuilder sb = new StringBuilder ();
--
-- sb.Append ("graph CacheItemPriorityQueue {\n");
-- sb.Append ("\tnode [color=lightblue, style=filled];\n");
-- if (root != null) {
-- if (root.Left == null && root.Right == null)
-- sb.AppendFormat ("\t{0};", root.Data.ExpiresAt);
-- else
-- TraverseTree (sb, root);
-- }
-- sb.Append ("}\n");
--
-- return sb.ToString ();
-- }
--
-- void TraverseTree (StringBuilder sb, Node root)
-- {
-- if (root.Left != null) {
-- sb.AppendFormat ("\t{0} -- {1};\n", root.Data.ExpiresAt, root.Left.Data.ExpiresAt);
-- TraverseTree (sb, root.Left);
++ index = heapCount - 1;
++ parentIndex = (index - 1) >> 1;
++
++ item = heap [index];
++ while (index > 0) {
++ parent = heap [parentIndex];
++ if (heap [index].ExpiresAt >= parent.ExpiresAt)
++ break;
++
++ heap [index] = parent;
++ index = parentIndex;
++ parentIndex = (index - 1) >> 1;
}
-- if (root.Right != null) {
-- sb.AppendFormat ("\t{0} -- {1};\n", root.Data.ExpiresAt, root.Right.Data.ExpiresAt);
-- TraverseTree (sb, root.Right);
-- }
++ heap [index] = item;
}
}
}
--- /dev/null
--- /dev/null
++//
++// Author(s):
++// Marek Habersack <mhabersack@novell.com>
++//
++// (C) 2010 Novell, Inc (http://novell.com)
++//
++//
++// Permission is hereby granted, free of charge, to any person obtaining
++// a copy of this software and associated documentation files (the
++// "Software"), to deal in the Software without restriction, including
++// without limitation the rights to use, copy, modify, merge, publish,
++// distribute, sublicense, and/or sell copies of the Software, and to
++// permit persons to whom the Software is furnished to do so, subject to
++// the following conditions:
++//
++// The above copyright notice and this permission notice shall be
++// included in all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++//
++using System;
++using System.Collections.Generic;
++using System.Diagnostics;
++using System.IO;
++using System.Text;
++using System.Threading;
++using System.Xml;
++
++namespace System.Web.Caching
++{
++ enum EDSequenceEntryType
++ {
++ Enqueue,
++ Dequeue,
++ Disable,
++ Peek
++ }
++
++#if DEBUG
++ [Serializable]
++ sealed class EDSequenceEntry
++ {
++ public readonly EDSequenceEntryType Type;
++ public readonly CacheItem Item;
++
++ public EDSequenceEntry ()
++ {}
++
++ public EDSequenceEntry (CacheItem item, EDSequenceEntryType type)
++ {
++ Type = type;
++ Item = item;
++ }
++ }
++#endif
++
++ sealed partial class CacheItemPriorityQueue
++ {
++#if DEBUG
++ Dictionary <Guid, CacheItem> items = new Dictionary <Guid, CacheItem> ();
++ List <EDSequenceEntry> edSequence = new List <EDSequenceEntry> ();
++
++
++ List <EDSequenceEntry> EDSequence {
++ get {
++ if (edSequence == null)
++ edSequence = new List <EDSequenceEntry> ();
++ return edSequence;
++ }
++ }
++#endif
++
++ [Conditional ("DEBUG")]
++ void InitDebugMode ()
++ {
++#if DEBUG
++ AppDomain.CurrentDomain.DomainUnload += new EventHandler (OnDomainUnload);
++#endif
++ }
++
++ [Conditional ("DEBUG")]
++ void AddSequenceEntry (CacheItem item, EDSequenceEntryType type)
++ {
++#if DEBUG
++ EDSequence.Add (new EDSequenceEntry (CopyItem (item), type));
++#endif
++ }
++
++#if DEBUG
++ CacheItem CopyItem (CacheItem item)
++ {
++ CacheItem newItem;
++
++ if (items.TryGetValue (item.Guid, out newItem))
++ return newItem;
++
++ newItem = new CacheItem ();
++ newItem.Key = item.Key;
++ newItem.AbsoluteExpiration = item.AbsoluteExpiration;
++ newItem.SlidingExpiration = item.SlidingExpiration;
++ newItem.Priority = item.Priority;
++ newItem.LastChange = item.LastChange;
++ newItem.ExpiresAt = item.ExpiresAt;
++ newItem.Disabled = item.Disabled;
++ newItem.Guid = item.Guid;
++
++ items.Add (newItem.Guid, newItem);
++
++ return newItem;
++ }
++
++ string CreateNewCacheItemInstanceCode (string indent, CacheItem item)
++ {
++ var sb = new StringBuilder (indent + "new CacheItem {");
++ sb.AppendFormat ("Key = \"{0}\", ", item.Key.Replace ("\n", "\\n").Replace ("\r", "\\r"));
++ sb.AppendFormat ("AbsoluteExpiration = DateTime.Parse (\"{0}\"), ", item.AbsoluteExpiration.ToString ());
++ sb.AppendFormat ("SlidingExpiration = TimeSpan.Parse (\"{0}\"), ", item.SlidingExpiration.ToString ());
++ sb.AppendFormat ("Priority = CacheItemPriority.{0}, ", item.Priority);
++ sb.AppendFormat ("LastChange = DateTime.Parse (\"{0}\"), ", item.LastChange.ToString ());
++ sb.AppendFormat ("ExpiresAt = {0}, ", item.ExpiresAt);
++ sb.AppendFormat ("Disabled = {0}, ", item.Disabled.ToString ().ToLowerInvariant ());
++ sb.AppendFormat ("Guid = new Guid (\"{0}\")}}, \n", item.Guid.ToString ());
++
++ return sb.ToString ();
++ }
++#endif
++
++ [Conditional ("DEBUG")]
++ public void OnItemDisable (CacheItem i)
++ {
++#if DEBUG
++ CacheItem item;
++ if (!items.TryGetValue (i.Guid, out item))
++ return;
++
++ EDSequence.Add (new EDSequenceEntry (CopyItem (i), EDSequenceEntryType.Disable));
++#endif
++ }
++
++#if DEBUG
++ void OnDomainUnload (object sender, EventArgs e)
++ {
++ if (EDSequence.Count == 0) {
++ Console.WriteLine ("No enqueue/dequeue sequence recorded.");
++ return;
++ }
++
++ try {
++ string filePath = Path.Combine (HttpRuntime.AppDomainAppPath, String.Format ("cache_pq_sequence_{0}.seq", DateTime.UtcNow.ToString ("yyyy-MM-dd_hh:mm:ss")));
++ var settings = new XmlWriterSettings ();
++ settings.Indent = true;
++ settings.IndentChars = "\t";
++ settings.NewLineChars = "\n";
++ settings.Encoding = Encoding.UTF8;
++
++ using (XmlWriter writer = XmlWriter.Create (filePath, settings)) {
++ writer.WriteStartDocument (true);
++ writer.WriteStartElement ("sequence");
++ foreach (EDSequenceEntry entry in EDSequence) {
++ writer.WriteStartElement ("entry");
++ writer.WriteAttributeString ("type", entry.Type.ToString ());
++ writer.WriteAttributeString ("key", entry.Item.Key.Replace ("\n", "\\n").Replace ("\r", "\\r"));
++ writer.WriteAttributeString ("absoluteExpiration", entry.Item.AbsoluteExpiration.Ticks.ToString ());
++ writer.WriteAttributeString ("slidingExpiration", entry.Item.SlidingExpiration.Ticks.ToString ());
++ writer.WriteAttributeString ("priority", entry.Item.Priority.ToString ());
++ writer.WriteAttributeString ("lastChange", entry.Item.LastChange.Ticks.ToString ());
++ writer.WriteAttributeString ("expiresAt", entry.Item.ExpiresAt.ToString ());
++ writer.WriteAttributeString ("disabled", entry.Item.Disabled.ToString ());
++ writer.WriteAttributeString ("guid", entry.Item.Guid.ToString ());
++ writer.WriteEndElement ();
++ }
++ writer.WriteEndElement ();
++ writer.Flush ();
++ }
++ } catch (Exception ex) {
++ Console.WriteLine ("Failed to write enqueue/dequeue sequence file. Exception was caught:\n{0}",
++ ex);
++ }
++ }
++#endif
++ }
++}
//
// System.Web.Caching.CachedVaryBy
//
--// Author(s):
++// Authors:
// Jackson Harper (jackson@ximian.com)
++// Marek Habersack <mhabersack@novell.com>
//
--// (C) 2003 Novell, Inc (http://www.novell.com)
++// (C) 2003-2010 Novell, Inc (http://www.novell.com)
//
//
using System.Globalization;
using System.Text;
using System.Collections;
++using System.Collections.Generic;
using System.Web.Util;
--namespace System.Web.Caching {
--
-- internal sealed class CachedVaryBy {
--
++namespace System.Web.Caching
++{
++ sealed class CachedVaryBy
++ {
string[] prms;
string[] headers;
string custom;
string key;
-- ArrayList item_list;
++ List <string> item_list;
bool wildCardParams;
internal CachedVaryBy (HttpCachePolicy policy, string key)
headers = policy.VaryByHeaders.GetHeaderNames (policy.OmitVaryStar);
custom = policy.GetVaryByCustom ();
this.key = key;
-- item_list = new ArrayList ();
++ item_list = new List <string> ();
wildCardParams = policy.VaryByParams ["*"];
}
-- internal ArrayList ItemList {
++ internal List <string> ItemList {
get { return item_list; }
}
internal string CreateKey (string file_path, HttpContext context)
{
-- StringBuilder builder = new StringBuilder ();
-- HttpApplication app = context.ApplicationInstance;
-- HttpRequest request = context.Request;
-- string newLine = Environment.NewLine;
++ if (String.IsNullOrEmpty (file_path))
++ throw new ArgumentNullException ("file_path");
++
++ StringBuilder builder = new StringBuilder ("vbk"); // VaryBy Key
++ HttpRequest request = context != null ? context.Request : null;
++ string name, value;
-- builder.Append ("CachedRawResponse" + newLine);
builder.Append (file_path);
-- builder.Append (newLine);
-- builder.Append ("METHOD:" + request.HttpMethod);
-- builder.Append (newLine);
--
++ if (request == null)
++ return builder.ToString ();
++
++ builder.Append (request.HttpMethod);
++
if (wildCardParams) {
++ builder.Append ("WQ"); // Wildcard, Query
foreach (string p in request.QueryString) {
-- // FIXME: QueryString might contain a null key if a page gets called like this: page.aspx?arg (w/out the "=")
-- if (p == null) continue;
-- builder.Append ("VPQ:");
-- builder.Append (p.ToLower (Helpers.InvariantCulture));
-- builder.Append ('=');
-- builder.Append (request.QueryString [p]);
-- builder.Append (newLine);
++ if (p == null)
++ continue;
++
++ builder.Append ('N'); // Name
++ builder.Append (p.ToLowerInvariant ());
++ value = request.QueryString [p];
++ if (String.IsNullOrEmpty (value))
++ continue;
++
++ builder.Append ('V'); // Value
++ builder.Append (value);
}
++
++ builder.Append ('F'); // Form
foreach (string p in request.Form) {
-- // FIXME: can this be null, too?
-- if (p == null) continue;
-- builder.Append ("VPF:");
-- builder.Append (p.ToLower (Helpers.InvariantCulture));
-- builder.Append ('=');
-- builder.Append (request.Form [p]);
-- builder.Append (newLine);
++ if (p == null)
++ continue;
++
++ builder.Append ('N'); // Name
++ builder.Append (p.ToLowerInvariant ());
++
++ value = request.Form [p];
++ if (String.IsNullOrEmpty (value))
++ continue;
++
++ builder.Append ('V'); // Value
++ builder.Append (value);
}
} else if (prms != null) {
-- for (int i=0; i<prms.Length; i++) {
-- if (request.QueryString [prms [i]] != null) {
-- builder.Append ("VPQ:");
-- builder.Append (prms [i].ToLower (Helpers.InvariantCulture));
-- builder.Append ('=');
-- builder.Append (request.QueryString [prms [i]]);
-- builder.Append (newLine);
++ StringBuilder fprms = null;
++ builder.Append ("SQ"); // Specified, Query
++
++ for (int i = 0; i < prms.Length; i++) {
++ name = prms [i];
++ if (String.IsNullOrEmpty (name))
++ continue;
++
++ value = request.QueryString [name];
++ if (value != null) {
++ builder.Append ('N'); // Name
++ builder.Append (name.ToLowerInvariant ());
++
++ if (value.Length > 0) {
++ builder.Append ('V'); // Value
++ builder.Append (value);
++ }
}
-- if (request.Form [prms [i]] != null) {
-- builder.Append ("VPF:");
-- builder.Append (prms [i].ToLower (Helpers.InvariantCulture));
-- builder.Append ('=');
-- builder.Append (request.Form [prms [i]]);
-- builder.Append (newLine);
++
++ value = request.Form [name];
++ if (value != null) {
++ if (fprms == null)
++ fprms = new StringBuilder ('F'); // Form
++
++ builder.Append ('N'); // Name
++ builder.Append (name.ToLowerInvariant ());
++ if (value.Length > 0) {
++ builder.Append ('V'); // Value
++ builder.Append (value);
++ }
}
}
++ if (fprms != null)
++ builder.Append (fprms.ToString ());
}
if (headers != null) {
-- for (int i=0; i<headers.Length; i++) {
-- builder.Append ("VH:");
-- builder.Append (headers [i].ToLower (Helpers.InvariantCulture));
-- builder.Append ('=');
-- builder.Append (request.Headers [headers [i]]);
-- builder.Append (newLine);
++ builder.Append ('H'); // Headers
++
++ for (int i=0; i < headers.Length; i++) {
++ builder.Append ('N'); // Name
++
++ name = headers [i];
++ builder.Append (name.ToLowerInvariant ());
++
++ value = request.Headers [name];
++ if (String.IsNullOrEmpty (value))
++ continue;
++
++ builder.Append ('V'); // Value
++ builder.Append (value);
}
}
if (custom != null) {
-- string s = app.GetVaryByCustomString (context, custom);
-- builder.Append ("VC:");
++ builder.Append ('C'); // Custom
++ string s = context.ApplicationInstance.GetVaryByCustomString (context, custom);
++ builder.Append ('N'); // Name
builder.Append (custom);
-- builder.Append ('=');
++ builder.Append ('V'); // Value
builder.Append (s != null ? s : "__null__");
-- builder.Append (newLine);
}
--
++
return builder.ToString ();
}
}
++2010-02-03 Marek Habersack <mhabersack@novell.com>
++
++ * OutputCache.cs: DefaultProviderName checks if there was any
++ provider configured and, if not, returns a built-in provider's
++ name.
++
++ * SqlCacheDependencyAdmin.cs: added
++
++ * OutputCacheProviderCollection.cs: added
++
++ * OutputCacheProvider.cs: added
++
++ * OutputCacheModule.cs: uses the 4.0 extensible output cache
++ provider model now (also internally in the 2.0 profile)
++ OutputCacheProvider is retrieved on every request using
++ HttpApplication.GetOutputCacheProviderName (4.0+). In the 2.0
++ profile an instance of InMemoryOutputCacheProvider is always
++ returned.
++
++ * InMemoryOutputCacheProvider.cs: default output cache provider
++ for ASP.NET 4.0, also used internally in the 2.0 profile.
++
++ * CachedVaryBy.cs: made the generated key shorter
++
++ * CacheItemPriorityQueueDebug.cs: debugging support for
++ CacheItemPriorityQueue. Most of the code is compiled only when the
++ DEBUG macro is defined. Debugging support includes recording of
++ the queue operations sequence which is output to an XML file on
++ appdomain shutdown. The recorded sequence files can be used to
++ generate NUnit test cases for the priority queue (see
++ ../Test/tools/README)
++
++ * CacheItemPriorityQueue.cs: rewritten using an array based heap
++ instead of a binary tree based one - implementation is simpler,
++ faster and more elegant. Heap is initially 32 entries long and
++ its size is doubled every time it fills up. After reaching a
++ threshold (8192 entries currently) it is shrunk to the number of
++ items + 1/3 of item count in order to preserve memory.
++
++ * CacheItem.cs: added a Guid field to easier distinguish items
++ (mostly for debugging purposes)
++
++ * CacheDependency.cs: minor performance improvements
++
++ * Cache.cs: better handling of timer periods
++
2010-01-25 Marek Habersack <mhabersack@novell.com>
* SqlCacheDependency.cs: added parameter checks to the
--- /dev/null
--- /dev/null
++//
++// Authors:
++// Marek Habersack <mhabersack@novell.com>
++//
++// (C) 2010 Novell, Inc (http://novell.com/)
++//
++
++//
++// Permission is hereby granted, free of charge, to any person obtaining
++// a copy of this software and associated documentation files (the
++// "Software"), to deal in the Software without restriction, including
++// without limitation the rights to use, copy, modify, merge, publish,
++// distribute, sublicense, and/or sell copies of the Software, and to
++// permit persons to whom the Software is furnished to do so, subject to
++// the following conditions:
++//
++// The above copyright notice and this permission notice shall be
++// included in all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++//
++
++using System.Collections.Generic;
++using System.Configuration.Provider;
++using System.Web;
++
++namespace System.Web.Caching
++{
++ sealed class InMemoryOutputCacheProvider : OutputCacheProvider
++ {
++ const string CACHE_PREFIX = "@InMemoryOCP_";
++ public InMemoryOutputCacheProvider ()
++ {}
++
++ public override object Add (string key, object entry, DateTime utcExpiry)
++ {
++ return HttpRuntime.InternalCache.Add (CACHE_PREFIX + key, entry, null, utcExpiry.ToLocalTime (), Cache.NoSlidingExpiration, CacheItemPriority.Normal, null);
++ }
++
++ public override object Get (string key)
++ {
++ return HttpRuntime.InternalCache.Get (CACHE_PREFIX + key);
++ }
++
++ public override void Remove (string key)
++ {
++ HttpRuntime.InternalCache.Remove (CACHE_PREFIX + key);
++ }
++
++ public override void Set (string key, object entry, DateTime utcExpiry)
++ {
++ Cache cache = HttpRuntime.InternalCache;
++ string cacheKey = CACHE_PREFIX + key;
++ object oldObject = cache.Get (cacheKey);
++
++ if (oldObject != null)
++ cache.Remove (cacheKey);
++
++ cache.Add (cacheKey, entry, null, utcExpiry.ToLocalTime (), Cache.NoSlidingExpiration, CacheItemPriority.Normal, null);
++ }
++ }
++}
{
public static class OutputCache
{
++ internal const string DEFAULT_PROVIDER_NAME = "AspNetInternalProvider";
++
static readonly object initLock = new object ();
static bool initialized;
static string defaultProviderName;
public static string DefaultProviderName {
get {
Init ();
++ if (String.IsNullOrEmpty (defaultProviderName))
++ return DEFAULT_PROVIDER_NAME;
++
return defaultProviderName;
}
}
static OutputCacheProvider LoadProvider (ProviderSettings ps)
{
-- Type type = HttpApplication.LoadType (ps.Type, true);
++ Type type = HttpApplication.LoadType (ps.Type, false);
++ if (type == null)
++ throw new ConfigurationErrorsException (String.Format ("Could not load type '{0}'.", ps.Type));
++
var ret = Activator.CreateInstance (type) as OutputCacheProvider;
ret.Initialize (ps.Name, ps.Parameters);
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
++using System;
using System.Collections;
using System.Collections.Generic;
++using System.Configuration.Provider;
using System.IO;
using System.Text;
using System.Web;
++using System.Web.Hosting;
using System.Web.UI;
using System.Web.Util;
using System.Web.Compilation;
{
sealed class OutputCacheModule : IHttpModule
{
++ OutputCacheProvider provider;
CacheItemRemovedCallback response_removed;
static object keysCacheLock = new object ();
Dictionary <string, string> keysCache;
Dictionary <string, string> entriesToInvalidate;
--
++
public OutputCacheModule ()
{
}
++ OutputCacheProvider FindCacheProvider (HttpApplication app)
++ {
++#if NET_4_0
++ HttpContext ctx = HttpContext.Current;
++ if (app == null) {
++ app = ctx != null ? ctx.ApplicationInstance : null;
++
++ if (app == null)
++ throw new InvalidOperationException ("Unable to find output cache provider.");
++ }
++
++ string providerName = app.GetOutputCacheProviderName (ctx);
++ if (String.IsNullOrEmpty (providerName))
++ throw new ProviderException ("Invalid OutputCacheProvider name. Name must not be null or an empty string.");
++
++ if (String.Compare (providerName, OutputCache.DEFAULT_PROVIDER_NAME, StringComparison.Ordinal) == 0) {
++ if (provider == null)
++ provider = new InMemoryOutputCacheProvider ();
++ return provider;
++ }
++
++ OutputCacheProviderCollection providers = OutputCache.Providers;
++ OutputCacheProvider ret = providers != null ? providers [providerName] : null;
++
++ if (ret == null)
++ throw new ProviderException (String.Format ("OutputCacheProvider named '{0}' cannot be found.", providerName));
++
++ return ret;
++#else
++ if (provider == null)
++ provider = new InMemoryOutputCacheProvider ();
++
++ return provider;
++#endif
++ }
++
public void Dispose ()
{
}
string entry = args.EntryName;
HttpContext context = args.Context;
string cacheValue;
--
++
lock (keysCacheLock) {
if (!keysCache.TryGetValue (entry, out cacheValue))
return;
--
++
keysCache.Remove (entry);
if (context == null) {
if (entriesToInvalidate == null) {
}
}
-- context.Cache.Remove (entry);
++ OutputCacheProvider provider = FindCacheProvider (context != null ? context.ApplicationInstance : null);
++ provider.Remove (entry);
if (!String.IsNullOrEmpty (cacheValue))
-- context.InternalCache.Remove (cacheValue);
++ provider.Remove (cacheValue);
}
void OnResolveRequestCache (object o, EventArgs args)
{
-- HttpApplication app = (HttpApplication) o;
-- HttpContext context = app.Context;
--
++ HttpApplication app = o as HttpApplication;
++ HttpContext context = app != null ? app.Context : null;
++
++ if (context == null)
++ return;
++
++ OutputCacheProvider provider = FindCacheProvider (app);
string vary_key = context.Request.FilePath;
-- CachedVaryBy varyby = context.Cache [vary_key] as CachedVaryBy;
++ CachedVaryBy varyby = provider.Get (vary_key) as CachedVaryBy;
string key;
CachedRawResponse c;
return;
key = varyby.CreateKey (vary_key, context);
-- c = context.InternalCache [key] as CachedRawResponse;
++ c = provider.Get (key) as CachedRawResponse;
if (c == null)
return;
lock (keysCacheLock) {
string invValue;
if (entriesToInvalidate != null && entriesToInvalidate.TryGetValue (vary_key, out invValue) && String.Compare (invValue, key, StringComparison.Ordinal) == 0) {
-- context.Cache.Remove (vary_key);
-- context.InternalCache.Remove (key);
++ provider.Remove (vary_key);
++ provider.Remove (key);
entriesToInvalidate.Remove (vary_key);
return;
}
if (!isValid) {
OnRawResponseRemoved (key, c, CacheItemRemovedReason.Removed);
return;
-- } else if (isIgnored) {
++ } else if (isIgnored)
return;
-- }
}
HttpResponse response = context.Response;
void OnUpdateRequestCache (object o, EventArgs args)
{
-- HttpApplication app = (HttpApplication) o;
-- HttpContext context = app.Context;
--
-- if (context.Response.IsCached && context.Response.StatusCode == 200 &&
-- !context.Trace.IsEnabled)
-- DoCacheInsert (context);
++ HttpApplication app = o as HttpApplication;
++ HttpContext context = app != null ? app.Context : null;
++ HttpResponse response = context != null ? context.Response : null;
++
++ if (response != null && response.IsCached && response.StatusCode == 200 && !context.Trace.IsEnabled)
++ DoCacheInsert (context, app, response);
}
-- void DoCacheInsert (HttpContext context)
++ void DoCacheInsert (HttpContext context, HttpApplication app, HttpResponse response)
{
string vary_key = context.Request.FilePath;
string key;
-- CachedVaryBy varyby = context.Cache [vary_key] as CachedVaryBy;
++ OutputCacheProvider provider = FindCacheProvider (app);
++ CachedVaryBy varyby = provider.Get (vary_key) as CachedVaryBy;
CachedRawResponse prev = null;
bool lookup = true;
string cacheKey = null, cacheValue = null;
++ HttpCachePolicy cachePolicy = response.Cache;
if (varyby == null) {
-- string path = context.Request.MapPath (vary_key);
-- string [] files = new string [] { path };
-- string [] keys = new string [0];
-- varyby = new CachedVaryBy (context.Response.Cache, vary_key);
-- context.Cache.Insert (vary_key, varyby,
-- new CacheDependency (files, keys),
-- Cache.NoAbsoluteExpiration,
-- Cache.NoSlidingExpiration,
-- CacheItemPriority.Normal, null);
++ varyby = new CachedVaryBy (cachePolicy, vary_key);
++ provider.Add (vary_key, varyby, Cache.NoAbsoluteExpiration);
lookup = false;
cacheKey = vary_key;
}
key = varyby.CreateKey (vary_key, context);
if (lookup)
-- prev = context.InternalCache [key] as CachedRawResponse;
++ prev = provider.Get (key) as CachedRawResponse;
if (prev == null) {
-- CachedRawResponse c = context.Response.GetCachedResponse ();
++ CachedRawResponse c = response.GetCachedResponse ();
if (c != null) {
-- string [] files = new string [] { };
string [] keys = new string [] { vary_key };
-- bool sliding = context.Response.Cache.Sliding;
--
-- context.InternalCache.Insert (key, c, new CacheDependency (files, keys),
-- (sliding ? Cache.NoAbsoluteExpiration :
-- context.Response.Cache.Expires),
-- (sliding ? TimeSpan.FromSeconds (
-- context.Response.Cache.Duration) :
-- Cache.NoSlidingExpiration),
-- CacheItemPriority.Normal, response_removed);
++ DateTime utcExpiry, absoluteExpiration;
++ TimeSpan slidingExpiration;
++
c.VaryBy = varyby;
varyby.ItemList.Add (key);
++
++ if (cachePolicy.Sliding) {
++ slidingExpiration = TimeSpan.FromSeconds (cachePolicy.Duration);
++ absoluteExpiration = Cache.NoAbsoluteExpiration;
++ utcExpiry = DateTime.UtcNow + slidingExpiration;
++ } else {
++ slidingExpiration = Cache.NoSlidingExpiration;
++ absoluteExpiration = cachePolicy.Expires;
++ utcExpiry = absoluteExpiration.ToUniversalTime ();
++ }
++
++ provider.Set (key, c, utcExpiry);
++ HttpRuntime.InternalCache.Insert (key, c, new CacheDependency (null, keys), absoluteExpiration, slidingExpiration,
++ CacheItemPriority.Normal, response_removed);
cacheValue = key;
}
}
}
}
-- static void OnRawResponseRemoved (string key, object value, CacheItemRemovedReason reason)
++ void OnRawResponseRemoved (string key, object value, CacheItemRemovedReason reason)
{
-- CachedRawResponse c = (CachedRawResponse) value;
++ CachedRawResponse c = value as CachedRawResponse;
++ CachedVaryBy varyby = c != null ? c.VaryBy : null;
++ if (varyby == null)
++ return;
-- c.VaryBy.ItemList.Remove (key);
-- if (c.VaryBy.ItemList.Count != 0)
++ List <string> itemList = varyby.ItemList;
++ OutputCacheProvider provider = FindCacheProvider (null);
++
++ itemList.Remove (key);
++ provider.Remove (key);
++
++ if (itemList.Count != 0)
return;
-- HttpRuntime.Cache.Remove (c.VaryBy.Key);
++ provider.Remove (varyby.Key);
}
}
}
--
namespace System.Web.Caching
{
-- public abstract class OutputCacheProvider : ProviderBase
++#if NET_4_0
++ public
++#endif
++ abstract class OutputCacheProvider : ProviderBase
{
protected OutputCacheProvider ()
{}
-- public abstract object Add (string key, Object entry, DateTime utcExpiry);
-- public abstract Object Get (string key);
++ public abstract object Add (string key, object entry, DateTime utcExpiry);
++ public abstract object Get (string key);
public abstract void Remove (string key);
public abstract void Set (string key, object entry, DateTime utcExpiry);
}
public sealed class OutputCacheProviderCollection : ProviderCollection
{
public OutputCacheProvider this [string name] {
-- get {
-- throw new NotImplementedException ();
-- }
++ get { return base [name] as OutputCacheProvider; }
}
public OutputCacheProviderCollection ()
public void CopyTo (OutputCacheProvider[] array, int index)
{
-- throw new NotImplementedException ();
++ base.CopyTo (array, index);
}
}
}
--- /dev/null
--- /dev/null
++//
++// Authors:
++// Marek Habersack <mhabersack@novell.com>
++//
++// (C) 2010 Novell, Inc (http://novell.com/)
++//
++//
++// Permission is hereby granted, free of charge, to any person obtaining
++// a copy of this software and associated documentation files (the
++// "Software"), to deal in the Software without restriction, including
++// without limitation the rights to use, copy, modify, merge, publish,
++// distribute, sublicense, and/or sell copies of the Software, and to
++// permit persons to whom the Software is furnished to do so, subject to
++// the following conditions:
++//
++// The above copyright notice and this permission notice shall be
++// included in all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++//
++
++using System;
++using System.Security.Permissions;
++using System.Web;
++
++namespace System.Web.Caching
++{
++ [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.High)]
++ public static class SqlCacheDependencyAdmin
++ {
++ public static string[] GetTablesEnabledForNotifications (string connectionString)
++ {
++ throw new NotImplementedException ();
++ }
++
++ public static void DisableNotifications (string connectionString)
++ {
++ throw new NotImplementedException ();
++ }
++
++ public static void DisableTableForNotifications (string connectionString, string table)
++ {
++ throw new NotImplementedException ();
++ }
++
++ public static void DisableTableForNotifications (string connectionString, string[] tables)
++ {
++ throw new NotImplementedException ();
++ }
++
++ public static void EnableNotifications (string connectionString)
++ {
++ throw new NotImplementedException ();
++ }
++
++ public static void EnableTableForNotifications (string connectionString, string table)
++ {
++ throw new NotImplementedException ();
++ }
++
++ public static void EnableTableForNotifications (string connectionString, string[] tables)
++ {
++ throw new NotImplementedException ();
++ }
++ }
++}
System.Web.Caching/CacheItemEnumerator.cs
System.Web.Caching/CacheItemPriority.cs
System.Web.Caching/CacheItemPriorityQueue.cs
++System.Web.Caching/CacheItemPriorityQueueDebug.cs
System.Web.Caching/CacheItemRemovedCallback.cs
System.Web.Caching/CacheItemRemovedReason.cs
System.Web.Caching/CacheItemUpdateCallback.cs
System.Web.Caching/CachedRawResponse.cs
System.Web.Caching/CachedVaryBy.cs
System.Web.Caching/DatabaseNotEnabledForNotificationException.cs
++System.Web.Caching/InMemoryOutputCacheProvider.cs
System.Web.Caching/OutputCacheModule.cs
++System.Web.Caching/OutputCacheProvider.cs
System.Web.Caching/SqlCacheDependency.cs
++System.Web.Caching/SqlCacheDependencyAdmin.cs
System.Web.Caching/TableNotEnabledForNotificationException.cs
System.Web/CapabilitiesLoader.cs
System.Web/BrowserCapabilities.cs
++2010-02-03 Marek Habersack <mhabersack@novell.com>
++
++ * HttpApplication.cs: GetOutputCacheProviderName returns the value
++ of OutputCache.DefaultProviderName
++
++ * HttpRuntime.cs: internal cache is used to hold the dependencies
++ now.
++
2010-01-20 Marek Habersack <mhabersack@novell.com>
* HttpContext.cs: implemented the 4.0 SetSessionStateBehavior
#if NET_4_0
public virtual string GetOutputCacheProviderName (HttpContext context)
{
-- var ocs = WebConfigurationManager.GetWebApplicationSection ("system.web/caching/outputCache") as OutputCacheSection;
--
-- return ocs.DefaultProviderName;
++ // LAMESPEC: doesn't throw ProviderException if context is null
++ return OutputCache.DefaultProviderName;
}
#endif
// Marek Habersack <mhabersack@novell.com>
//
//
--// Copyright (C) 2005-2009 Novell, Inc (http://www.novell.com)
++// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
cache = new Cache ();
internalCache = new Cache ();
-- internalCache.DependencyCache = cache;
++ internalCache.DependencyCache = internalCache;
#endif
do_RealProcessRequest = new WaitCallback (RealProcessRequest);
}
Test/standalone-tests/Consts.cs
Test/standalone-tests/Locations.cs
++Test/standalone-tests/OutputCacheProvider.cs
Test/standalone-tests/SiteMapDuplicateEntries_Bug570194.cs
mainsoft/NunitWeb/NunitWeb/Tests/Book.cs
mainsoft/NunitWeb/NunitWeb/Tests/BookType.cs
System.Web/AppBrowsersTest.cs
++System.Web/HttpApplicationTest.cs
System.Web/HttpBrowserCapabilitiesTest.cs
System.Web/HttpCacheVaryByContentEncodingsTest.cs
System.Web/HttpCacheVaryByHeadersTest.cs
System.Web.Caching/AggregateCacheDependencyTest.cs
System.Web.Caching/CacheCas.cs
System.Web.Caching/CacheDependencyCas.cs
++System.Web.Caching/CacheItemPriorityQueueTest.cs
++System.Web.Caching/CacheItemPriorityQueueTest_generated.cs
System.Web.Caching/FileResponseElementTest.cs
System.Web.Caching/HeaderElementTest.cs
System.Web.Caching/MemoryResponseElementTest.cs
--- /dev/null
--- /dev/null
++// Authors:
++// Marek Habersack <mhabersack@novell.com>
++//
++// Copyright (C) 2010 Novell Inc. http://novell.com
++//
++
++//
++// Permission is hereby granted, free of charge, to any person obtaining
++// a copy of this software and associated documentation files (the
++// "Software"), to deal in the Software without restriction, including
++// without limitation the rights to use, copy, modify, merge, publish,
++// distribute, sublicense, and/or sell copies of the Software, and to
++// permit persons to whom the Software is furnished to do so, subject to
++// the following conditions:
++//
++// The above copyright notice and this permission notice shall be
++// included in all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++//
++using System;
++
++using NUnit.Framework;
++
++namespace MonoTests.System.Web.Caching
++{
++ [TestFixture]
++ public partial class CacheItemPriorityQueueTest
++ {
++ }
++}
--- /dev/null
--- /dev/null
++//
++// This source was autogenerated - do not modify it, changes may not be preserved
++//
++#if !TARGET_DOTNET
++using System;
++using System.Collections.Generic;
++using System.Web;
++using System.Web.Caching;
++
++using NUnit.Framework;
++
++namespace MonoTests.System.Web.Caching
++{
++ public partial class CacheItemPriorityQueueTest
++ {
++ [Test (Description="Generated from sequence file cache_pq_sequence_2010-01-29_10:24:08.seq")]
++ public void Sequence_0000 ()
++ {
++ var list = new List <CacheItem> {
++ new CacheItem {Key = "PartialCachingControl\nGUID: 0a543377-1bcc-4ec5-9096-616fa29ec3f5\n", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:23:38 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 11:23:33 AM"), ExpiresAt = 634003610181191660, Disabled = false, Guid = new Guid ("b50f84e2-b96b-4183-ac6a-afeec88a258d")},
++ new CacheItem {Key = "@@@InProc@074DE5C88B2981727366B98C", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:43:33 AM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 11:23:33 AM"), ExpiresAt = 634003622131234770, Disabled = false, Guid = new Guid ("78f08aef-31b7-49e6-8ba9-2d7b09f5340e")},
++ new CacheItem {Key = "@@@InProc@074DE5C88B2981727366B98C", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:43:33 AM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 11:23:33 AM"), ExpiresAt = 634003622131252350, Disabled = false, Guid = new Guid ("ecd90b49-bb12-4524-818e-977356f8b9d2")},
++ new CacheItem {Key = "@InMemoryOCP_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:23:41 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 11:23:33 AM"), ExpiresAt = 634003610216655680, Disabled = false, Guid = new Guid ("38e7f821-d638-4f1d-89bd-41db556eb37a")},
++ new CacheItem {Key = "@prefix@_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:23:41 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 11:23:33 AM"), ExpiresAt = 634003610216655680, Disabled = false, Guid = new Guid ("6e723bac-5e11-4cb3-933f-39923948371c")},
++ new CacheItem {Key = "PartialCachingControl\nGUID: 0a543377-1bcc-4ec5-9096-616fa29ec3f5\n", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:23:51 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 11:23:46 AM"), ExpiresAt = 634003610312287880, Disabled = false, Guid = new Guid ("93db96c7-eb5b-43b3-8524-e7d90cd159d7")},
++ new CacheItem {Key = "@@@InProc@074DE5C88B2981727366B98C", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:43:46 AM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 11:23:46 AM"), ExpiresAt = 634003622262288710, Disabled = false, Guid = new Guid ("fc310ed6-2027-4d16-9343-a3e4b3487bd0")},
++ new CacheItem {Key = "@@@InProc@074DE5C88B2981727366B98C", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:43:46 AM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 11:23:46 AM"), ExpiresAt = 634003622262288910, Disabled = false, Guid = new Guid ("de47322e-63c8-474f-8d2f-fb6a591075df")},
++ new CacheItem {Key = "@InMemoryOCP_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:23:56 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 11:23:46 AM"), ExpiresAt = 634003610362271610, Disabled = false, Guid = new Guid ("f003a7ba-af48-4551-a206-1184fc83e621")},
++ new CacheItem {Key = "@prefix@_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:23:56 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 11:23:46 AM"), ExpiresAt = 634003610362271610, Disabled = false, Guid = new Guid ("5777ab80-078b-4f9a-81fb-f7872aceba99")},
++ };
++ var queue = new CacheItemPriorityQueue ();
++ CacheItem item;
++
++ queue.Enqueue (list [0]);
++ Assert.AreEqual (1, queue.Count, "Enqueue-0000-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", queue.Peek ().Guid.ToString(), "Enqueue-0000-2");
++
++ queue.Enqueue (list [1]);
++ Assert.AreEqual (2, queue.Count, "Enqueue-0001-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", queue.Peek ().Guid.ToString(), "Enqueue-0001-2");
++
++ item = list [1];
++ Assert.IsNotNull (item, "Disable-0000-1");
++ Assert.AreEqual ("78f08aef-31b7-49e6-8ba9-2d7b09f5340e", item.Guid.ToString(), "Disable-0000-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0000-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [2]);
++ Assert.AreEqual (3, queue.Count, "Enqueue-0002-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", queue.Peek ().Guid.ToString(), "Enqueue-0002-2");
++
++ queue.Enqueue (list [3]);
++ Assert.AreEqual (4, queue.Count, "Enqueue-0003-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", queue.Peek ().Guid.ToString(), "Enqueue-0003-2");
++
++ queue.Enqueue (list [4]);
++ Assert.AreEqual (5, queue.Count, "Enqueue-0004-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", queue.Peek ().Guid.ToString(), "Enqueue-0004-2");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0000-1");
++ Assert.AreEqual (4, queue.Count, "Dequeue-0000-2");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", item.Guid.ToString (), "Dequeue-0000-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0000-4");
++
++ item = list [0];
++ Assert.IsNotNull (item, "Disable-0001-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", item.Guid.ToString(), "Disable-0001-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0001-3");
++ item.Disabled = true;
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0001-1");
++ Assert.AreEqual (3, queue.Count, "Dequeue-0001-2");
++ Assert.AreEqual ("6e723bac-5e11-4cb3-933f-39923948371c", item.Guid.ToString (), "Dequeue-0001-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0001-4");
++
++ item = list [3];
++ Assert.IsNotNull (item, "Disable-0002-1");
++ Assert.AreEqual ("38e7f821-d638-4f1d-89bd-41db556eb37a", item.Guid.ToString(), "Disable-0002-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0002-3");
++ item.Disabled = true;
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0002-1");
++ Assert.AreEqual (2, queue.Count, "Dequeue-0002-2");
++ Assert.AreEqual ("38e7f821-d638-4f1d-89bd-41db556eb37a", item.Guid.ToString (), "Dequeue-0002-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0002-4");
++
++ item = list [4];
++ Assert.IsNotNull (item, "Disable-0003-1");
++ Assert.AreEqual ("6e723bac-5e11-4cb3-933f-39923948371c", item.Guid.ToString(), "Disable-0003-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0003-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [5]);
++ Assert.AreEqual (3, queue.Count, "Enqueue-0005-1");
++ Assert.AreEqual ("93db96c7-eb5b-43b3-8524-e7d90cd159d7", queue.Peek ().Guid.ToString(), "Enqueue-0005-2");
++
++ item = list [2];
++ Assert.IsNotNull (item, "Disable-0004-1");
++ Assert.AreEqual ("ecd90b49-bb12-4524-818e-977356f8b9d2", item.Guid.ToString(), "Disable-0004-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0004-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [6]);
++ Assert.AreEqual (4, queue.Count, "Enqueue-0006-1");
++ Assert.AreEqual ("93db96c7-eb5b-43b3-8524-e7d90cd159d7", queue.Peek ().Guid.ToString(), "Enqueue-0006-2");
++
++ item = list [6];
++ Assert.IsNotNull (item, "Disable-0005-1");
++ Assert.AreEqual ("fc310ed6-2027-4d16-9343-a3e4b3487bd0", item.Guid.ToString(), "Disable-0005-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0005-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [7]);
++ Assert.AreEqual (5, queue.Count, "Enqueue-0007-1");
++ Assert.AreEqual ("93db96c7-eb5b-43b3-8524-e7d90cd159d7", queue.Peek ().Guid.ToString(), "Enqueue-0007-2");
++
++ queue.Enqueue (list [8]);
++ Assert.AreEqual (6, queue.Count, "Enqueue-0008-1");
++ Assert.AreEqual ("93db96c7-eb5b-43b3-8524-e7d90cd159d7", queue.Peek ().Guid.ToString(), "Enqueue-0008-2");
++
++ queue.Enqueue (list [9]);
++ Assert.AreEqual (7, queue.Count, "Enqueue-0009-1");
++ Assert.AreEqual ("93db96c7-eb5b-43b3-8524-e7d90cd159d7", queue.Peek ().Guid.ToString(), "Enqueue-0009-2");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0003-1");
++ Assert.AreEqual (6, queue.Count, "Dequeue-0003-2");
++ Assert.AreEqual ("93db96c7-eb5b-43b3-8524-e7d90cd159d7", item.Guid.ToString (), "Dequeue-0003-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0003-4");
++
++ item = list [5];
++ Assert.IsNotNull (item, "Disable-0006-1");
++ Assert.AreEqual ("93db96c7-eb5b-43b3-8524-e7d90cd159d7", item.Guid.ToString(), "Disable-0006-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0006-3");
++ item.Disabled = true;
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0004-1");
++ Assert.AreEqual (5, queue.Count, "Dequeue-0004-2");
++ Assert.AreEqual ("5777ab80-078b-4f9a-81fb-f7872aceba99", item.Guid.ToString (), "Dequeue-0004-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0004-4");
++
++ item = list [8];
++ Assert.IsNotNull (item, "Disable-0007-1");
++ Assert.AreEqual ("f003a7ba-af48-4551-a206-1184fc83e621", item.Guid.ToString(), "Disable-0007-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0007-3");
++ item.Disabled = true;
++
++ Assert.AreEqual (5, queue.Count, "Queue size after sequence");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0005-1");
++ Assert.AreEqual (4, queue.Count, "Dequeue-0005-2");
++ Assert.AreEqual ("f003a7ba-af48-4551-a206-1184fc83e621", item.Guid.ToString (), "Dequeue-0005-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0005-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0006-1");
++ Assert.AreEqual (3, queue.Count, "Dequeue-0006-2");
++ Assert.AreEqual ("78f08aef-31b7-49e6-8ba9-2d7b09f5340e", item.Guid.ToString (), "Dequeue-0006-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0006-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0007-1");
++ Assert.AreEqual (2, queue.Count, "Dequeue-0007-2");
++ Assert.AreEqual ("ecd90b49-bb12-4524-818e-977356f8b9d2", item.Guid.ToString (), "Dequeue-0007-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0007-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0008-1");
++ Assert.AreEqual (1, queue.Count, "Dequeue-0008-2");
++ Assert.AreEqual ("fc310ed6-2027-4d16-9343-a3e4b3487bd0", item.Guid.ToString (), "Dequeue-0008-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0008-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0009-1");
++ Assert.AreEqual (0, queue.Count, "Dequeue-0009-2");
++ Assert.AreEqual ("de47322e-63c8-474f-8d2f-fb6a591075df", item.Guid.ToString (), "Dequeue-0009-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0009-4");
++
++ }
++
++ [Test (Description="Generated from sequence file cache_pq_sequence_2010-01-29_10:24:08_001.seq")]
++ public void Sequence_0001 ()
++ {
++ var list = new List <CacheItem> {
++ new CacheItem {Key = "PartialCachingControl\nGUID: 0a543377-1bcc-4ec5-9096-616fa29ec3f5\n", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:23:38 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 11:23:33 AM"), ExpiresAt = 634003610181191660, Disabled = false, Guid = new Guid ("b50f84e2-b96b-4183-ac6a-afeec88a258d")},
++ new CacheItem {Key = "@@@InProc@074DE5C88B2981727366B98C", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:43:33 AM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 11:23:33 AM"), ExpiresAt = 634003622131234770, Disabled = false, Guid = new Guid ("78f08aef-31b7-49e6-8ba9-2d7b09f5340e")},
++ new CacheItem {Key = "@@@InProc@074DE5C88B2981727366B98C", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:43:33 AM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 11:23:33 AM"), ExpiresAt = 634003622131252350, Disabled = false, Guid = new Guid ("ecd90b49-bb12-4524-818e-977356f8b9d2")},
++ new CacheItem {Key = "@InMemoryOCP_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:23:41 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 11:23:33 AM"), ExpiresAt = 634003610216655680, Disabled = false, Guid = new Guid ("38e7f821-d638-4f1d-89bd-41db556eb37a")},
++ new CacheItem {Key = "@prefix@_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:23:41 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 11:23:33 AM"), ExpiresAt = 634003610216655680, Disabled = false, Guid = new Guid ("6e723bac-5e11-4cb3-933f-39923948371c")},
++ new CacheItem {Key = "PartialCachingControl\nGUID: 0a543377-1bcc-4ec5-9096-616fa29ec3f5\n", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:23:51 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 11:23:46 AM"), ExpiresAt = 634003610312287880, Disabled = false, Guid = new Guid ("93db96c7-eb5b-43b3-8524-e7d90cd159d7")},
++ new CacheItem {Key = "@@@InProc@074DE5C88B2981727366B98C", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:43:46 AM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 11:23:46 AM"), ExpiresAt = 634003622262288710, Disabled = false, Guid = new Guid ("fc310ed6-2027-4d16-9343-a3e4b3487bd0")},
++ new CacheItem {Key = "@@@InProc@074DE5C88B2981727366B98C", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:43:46 AM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 11:23:46 AM"), ExpiresAt = 634003622262288910, Disabled = false, Guid = new Guid ("de47322e-63c8-474f-8d2f-fb6a591075df")},
++ new CacheItem {Key = "@InMemoryOCP_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:23:56 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 11:23:46 AM"), ExpiresAt = 634003610362271610, Disabled = false, Guid = new Guid ("f003a7ba-af48-4551-a206-1184fc83e621")},
++ new CacheItem {Key = "@prefix@_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:23:56 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 11:23:46 AM"), ExpiresAt = 634003610362271610, Disabled = false, Guid = new Guid ("5777ab80-078b-4f9a-81fb-f7872aceba99")},
++ };
++ var queue = new CacheItemPriorityQueue ();
++ CacheItem item;
++
++ queue.Enqueue (list [0]);
++ Assert.AreEqual (1, queue.Count, "Enqueue-0000-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", queue.Peek ().Guid.ToString(), "Enqueue-0000-2");
++
++ queue.Enqueue (list [1]);
++ Assert.AreEqual (2, queue.Count, "Enqueue-0001-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", queue.Peek ().Guid.ToString(), "Enqueue-0001-2");
++
++ queue.Enqueue (list [2]);
++ Assert.AreEqual (3, queue.Count, "Enqueue-0002-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", queue.Peek ().Guid.ToString(), "Enqueue-0002-2");
++
++ queue.Enqueue (list [3]);
++ Assert.AreEqual (4, queue.Count, "Enqueue-0003-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", queue.Peek ().Guid.ToString(), "Enqueue-0003-2");
++
++ queue.Enqueue (list [4]);
++ Assert.AreEqual (5, queue.Count, "Enqueue-0004-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", queue.Peek ().Guid.ToString(), "Enqueue-0004-2");
++
++ queue.Enqueue (list [5]);
++ Assert.AreEqual (6, queue.Count, "Enqueue-0005-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", queue.Peek ().Guid.ToString(), "Enqueue-0005-2");
++
++ queue.Enqueue (list [6]);
++ Assert.AreEqual (7, queue.Count, "Enqueue-0006-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", queue.Peek ().Guid.ToString(), "Enqueue-0006-2");
++
++ queue.Enqueue (list [7]);
++ Assert.AreEqual (8, queue.Count, "Enqueue-0007-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", queue.Peek ().Guid.ToString(), "Enqueue-0007-2");
++
++ queue.Enqueue (list [8]);
++ Assert.AreEqual (9, queue.Count, "Enqueue-0008-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", queue.Peek ().Guid.ToString(), "Enqueue-0008-2");
++
++ queue.Enqueue (list [9]);
++ Assert.AreEqual (10, queue.Count, "Enqueue-0009-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", queue.Peek ().Guid.ToString(), "Enqueue-0009-2");
++
++ Assert.AreEqual (10, queue.Count, "Queue size after sequence");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0000-1");
++ Assert.AreEqual (9, queue.Count, "Dequeue-0000-2");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", item.Guid.ToString (), "Dequeue-0000-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0000-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0001-1");
++ Assert.AreEqual (8, queue.Count, "Dequeue-0001-2");
++ Assert.AreEqual ("38e7f821-d638-4f1d-89bd-41db556eb37a", item.Guid.ToString (), "Dequeue-0001-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0001-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0002-1");
++ Assert.AreEqual (7, queue.Count, "Dequeue-0002-2");
++ Assert.AreEqual ("6e723bac-5e11-4cb3-933f-39923948371c", item.Guid.ToString (), "Dequeue-0002-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0002-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0003-1");
++ Assert.AreEqual (6, queue.Count, "Dequeue-0003-2");
++ Assert.AreEqual ("93db96c7-eb5b-43b3-8524-e7d90cd159d7", item.Guid.ToString (), "Dequeue-0003-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0003-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0004-1");
++ Assert.AreEqual (5, queue.Count, "Dequeue-0004-2");
++ Assert.AreEqual ("f003a7ba-af48-4551-a206-1184fc83e621", item.Guid.ToString (), "Dequeue-0004-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0004-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0005-1");
++ Assert.AreEqual (4, queue.Count, "Dequeue-0005-2");
++ Assert.AreEqual ("5777ab80-078b-4f9a-81fb-f7872aceba99", item.Guid.ToString (), "Dequeue-0005-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0005-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0006-1");
++ Assert.AreEqual (3, queue.Count, "Dequeue-0006-2");
++ Assert.AreEqual ("78f08aef-31b7-49e6-8ba9-2d7b09f5340e", item.Guid.ToString (), "Dequeue-0006-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0006-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0007-1");
++ Assert.AreEqual (2, queue.Count, "Dequeue-0007-2");
++ Assert.AreEqual ("ecd90b49-bb12-4524-818e-977356f8b9d2", item.Guid.ToString (), "Dequeue-0007-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0007-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0008-1");
++ Assert.AreEqual (1, queue.Count, "Dequeue-0008-2");
++ Assert.AreEqual ("fc310ed6-2027-4d16-9343-a3e4b3487bd0", item.Guid.ToString (), "Dequeue-0008-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0008-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0009-1");
++ Assert.AreEqual (0, queue.Count, "Dequeue-0009-2");
++ Assert.AreEqual ("de47322e-63c8-474f-8d2f-fb6a591075df", item.Guid.ToString (), "Dequeue-0009-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0009-4");
++
++ }
++
++ [Test (Description="Generated from sequence file cache_pq_sequence_2010-01-29_10:24:08_002.seq")]
++ public void Sequence_0002 ()
++ {
++ var list = new List <CacheItem> {
++ new CacheItem {Key = "PartialCachingControl\nGUID: 0a543377-1bcc-4ec5-9096-616fa29ec3f5\n", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:23:38 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 11:23:33 AM"), ExpiresAt = 634003610181191660, Disabled = false, Guid = new Guid ("b50f84e2-b96b-4183-ac6a-afeec88a258d")},
++ new CacheItem {Key = "@@@InProc@074DE5C88B2981727366B98C", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:43:33 AM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 11:23:33 AM"), ExpiresAt = 634003622131234770, Disabled = false, Guid = new Guid ("78f08aef-31b7-49e6-8ba9-2d7b09f5340e")},
++ new CacheItem {Key = "@@@InProc@074DE5C88B2981727366B98C", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:43:33 AM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 11:23:33 AM"), ExpiresAt = 634003622131252350, Disabled = false, Guid = new Guid ("ecd90b49-bb12-4524-818e-977356f8b9d2")},
++ new CacheItem {Key = "@InMemoryOCP_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:23:41 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 11:23:33 AM"), ExpiresAt = 634003610216655680, Disabled = false, Guid = new Guid ("38e7f821-d638-4f1d-89bd-41db556eb37a")},
++ new CacheItem {Key = "@prefix@_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:23:41 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 11:23:33 AM"), ExpiresAt = 634003610216655680, Disabled = false, Guid = new Guid ("6e723bac-5e11-4cb3-933f-39923948371c")},
++ new CacheItem {Key = "PartialCachingControl\nGUID: 0a543377-1bcc-4ec5-9096-616fa29ec3f5\n", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:23:51 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 11:23:46 AM"), ExpiresAt = 634003610312287880, Disabled = false, Guid = new Guid ("93db96c7-eb5b-43b3-8524-e7d90cd159d7")},
++ new CacheItem {Key = "@@@InProc@074DE5C88B2981727366B98C", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:43:46 AM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 11:23:46 AM"), ExpiresAt = 634003622262288710, Disabled = false, Guid = new Guid ("fc310ed6-2027-4d16-9343-a3e4b3487bd0")},
++ new CacheItem {Key = "@@@InProc@074DE5C88B2981727366B98C", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:43:46 AM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 11:23:46 AM"), ExpiresAt = 634003622262288910, Disabled = false, Guid = new Guid ("de47322e-63c8-474f-8d2f-fb6a591075df")},
++ new CacheItem {Key = "@InMemoryOCP_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:23:56 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 11:23:46 AM"), ExpiresAt = 634003610362271610, Disabled = false, Guid = new Guid ("f003a7ba-af48-4551-a206-1184fc83e621")},
++ new CacheItem {Key = "@prefix@_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 11:23:56 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 11:23:46 AM"), ExpiresAt = 634003610362271610, Disabled = false, Guid = new Guid ("5777ab80-078b-4f9a-81fb-f7872aceba99")},
++ };
++ var queue = new CacheItemPriorityQueue ();
++ CacheItem item;
++
++ queue.Enqueue (list [0]);
++ Assert.AreEqual (1, queue.Count, "Enqueue-0000-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", queue.Peek ().Guid.ToString(), "Enqueue-0000-2");
++
++ queue.Enqueue (list [1]);
++ Assert.AreEqual (2, queue.Count, "Enqueue-0001-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", queue.Peek ().Guid.ToString(), "Enqueue-0001-2");
++
++ queue.Enqueue (list [2]);
++ Assert.AreEqual (3, queue.Count, "Enqueue-0002-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", queue.Peek ().Guid.ToString(), "Enqueue-0002-2");
++
++ queue.Enqueue (list [3]);
++ Assert.AreEqual (4, queue.Count, "Enqueue-0003-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", queue.Peek ().Guid.ToString(), "Enqueue-0003-2");
++
++ queue.Enqueue (list [4]);
++ Assert.AreEqual (5, queue.Count, "Enqueue-0004-1");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", queue.Peek ().Guid.ToString(), "Enqueue-0004-2");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0000-1");
++ Assert.AreEqual (4, queue.Count, "Dequeue-0000-2");
++ Assert.AreEqual ("b50f84e2-b96b-4183-ac6a-afeec88a258d", item.Guid.ToString (), "Dequeue-0000-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0000-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0001-1");
++ Assert.AreEqual (3, queue.Count, "Dequeue-0001-2");
++ Assert.AreEqual ("6e723bac-5e11-4cb3-933f-39923948371c", item.Guid.ToString (), "Dequeue-0001-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0001-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0002-1");
++ Assert.AreEqual (2, queue.Count, "Dequeue-0002-2");
++ Assert.AreEqual ("38e7f821-d638-4f1d-89bd-41db556eb37a", item.Guid.ToString (), "Dequeue-0002-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0002-4");
++
++ queue.Enqueue (list [5]);
++ Assert.AreEqual (3, queue.Count, "Enqueue-0005-1");
++ Assert.AreEqual ("93db96c7-eb5b-43b3-8524-e7d90cd159d7", queue.Peek ().Guid.ToString(), "Enqueue-0005-2");
++
++ queue.Enqueue (list [6]);
++ Assert.AreEqual (4, queue.Count, "Enqueue-0006-1");
++ Assert.AreEqual ("93db96c7-eb5b-43b3-8524-e7d90cd159d7", queue.Peek ().Guid.ToString(), "Enqueue-0006-2");
++
++ queue.Enqueue (list [7]);
++ Assert.AreEqual (5, queue.Count, "Enqueue-0007-1");
++ Assert.AreEqual ("93db96c7-eb5b-43b3-8524-e7d90cd159d7", queue.Peek ().Guid.ToString(), "Enqueue-0007-2");
++
++ queue.Enqueue (list [8]);
++ Assert.AreEqual (6, queue.Count, "Enqueue-0008-1");
++ Assert.AreEqual ("93db96c7-eb5b-43b3-8524-e7d90cd159d7", queue.Peek ().Guid.ToString(), "Enqueue-0008-2");
++
++ queue.Enqueue (list [9]);
++ Assert.AreEqual (7, queue.Count, "Enqueue-0009-1");
++ Assert.AreEqual ("93db96c7-eb5b-43b3-8524-e7d90cd159d7", queue.Peek ().Guid.ToString(), "Enqueue-0009-2");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0003-1");
++ Assert.AreEqual (6, queue.Count, "Dequeue-0003-2");
++ Assert.AreEqual ("93db96c7-eb5b-43b3-8524-e7d90cd159d7", item.Guid.ToString (), "Dequeue-0003-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0003-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0004-1");
++ Assert.AreEqual (5, queue.Count, "Dequeue-0004-2");
++ Assert.AreEqual ("5777ab80-078b-4f9a-81fb-f7872aceba99", item.Guid.ToString (), "Dequeue-0004-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0004-4");
++
++ Assert.AreEqual (5, queue.Count, "Queue size after sequence");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0005-1");
++ Assert.AreEqual (4, queue.Count, "Dequeue-0005-2");
++ Assert.AreEqual ("f003a7ba-af48-4551-a206-1184fc83e621", item.Guid.ToString (), "Dequeue-0005-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0005-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0006-1");
++ Assert.AreEqual (3, queue.Count, "Dequeue-0006-2");
++ Assert.AreEqual ("78f08aef-31b7-49e6-8ba9-2d7b09f5340e", item.Guid.ToString (), "Dequeue-0006-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0006-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0007-1");
++ Assert.AreEqual (2, queue.Count, "Dequeue-0007-2");
++ Assert.AreEqual ("ecd90b49-bb12-4524-818e-977356f8b9d2", item.Guid.ToString (), "Dequeue-0007-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0007-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0008-1");
++ Assert.AreEqual (1, queue.Count, "Dequeue-0008-2");
++ Assert.AreEqual ("fc310ed6-2027-4d16-9343-a3e4b3487bd0", item.Guid.ToString (), "Dequeue-0008-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0008-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0009-1");
++ Assert.AreEqual (0, queue.Count, "Dequeue-0009-2");
++ Assert.AreEqual ("de47322e-63c8-474f-8d2f-fb6a591075df", item.Guid.ToString (), "Dequeue-0009-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0009-4");
++
++ }
++
++ [Test (Description="Generated from sequence file cache_pq_sequence_2010-01-29_12:31:31.seq")]
++ public void Sequence_0003 ()
++ {
++ var list = new List <CacheItem> {
++ new CacheItem {Key = "PartialCachingControl\nGUID: 19e19704-457b-4894-978c-63d6d022bf22\n", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:30:31 PM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 1:30:26 PM"), ExpiresAt = 634003686315246510, Disabled = false, Guid = new Guid ("3378afe8-5a2a-4f30-aedd-fa146880f93e")},
++ new CacheItem {Key = "@@@InProc@A3D557581E229FAEA58A8D4F", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:50:26 PM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 1:30:26 PM"), ExpiresAt = 634003698265290760, Disabled = false, Guid = new Guid ("33191cc7-c1b4-4726-b428-64efb69a6c46")},
++ new CacheItem {Key = "@@@InProc@A3D557581E229FAEA58A8D4F", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:50:26 PM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 1:30:26 PM"), ExpiresAt = 634003698265308270, Disabled = false, Guid = new Guid ("88bee6f1-09ac-4af2-9bc3-ebd619009377")},
++ new CacheItem {Key = "@InMemoryOCP_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:30:35 PM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 1:30:26 PM"), ExpiresAt = 634003686350855860, Disabled = false, Guid = new Guid ("e290608d-7086-41a6-a87a-3f3051c14780")},
++ new CacheItem {Key = "@prefix@_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:30:35 PM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 1:30:26 PM"), ExpiresAt = 634003686350855860, Disabled = false, Guid = new Guid ("f374c3d0-06a5-4b0d-8fb5-f0e94a876847")},
++ new CacheItem {Key = "PartialCachingControl\nGUID: 19e19704-457b-4894-978c-63d6d022bf22\n", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:30:37 PM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 1:30:32 PM"), ExpiresAt = 634003686370745960, Disabled = false, Guid = new Guid ("94cc61f5-312e-4d03-8d56-4e8b400f8ca0")},
++ new CacheItem {Key = "@@@InProc@A3D557581E229FAEA58A8D4F", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:50:32 PM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 1:30:32 PM"), ExpiresAt = 634003698320747270, Disabled = false, Guid = new Guid ("986174eb-da85-4a7b-9919-cd0668db69bf")},
++ new CacheItem {Key = "@@@InProc@A3D557581E229FAEA58A8D4F", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:50:32 PM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 1:30:32 PM"), ExpiresAt = 634003698320747680, Disabled = false, Guid = new Guid ("3c5fd8ab-a611-4bfb-afb0-5acee9b45dda")},
++ new CacheItem {Key = "@InMemoryOCP_vbk/default.aspxGETWQNgVadmin_edituserNuV78FH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:30:42 PM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 1:30:32 PM"), ExpiresAt = 634003686420678320, Disabled = false, Guid = new Guid ("2d354d5c-8996-4932-ba5f-cd3591fe95cb")},
++ new CacheItem {Key = "@prefix@_vbk/default.aspxGETWQNgVadmin_edituserNuV78FH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:30:42 PM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 1:30:32 PM"), ExpiresAt = 634003686420678320, Disabled = false, Guid = new Guid ("93a0e663-0354-4301-ac27-9e782091f661")},
++ new CacheItem {Key = "@@@InProc@A3D557581E229FAEA58A8D4F", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:50:36 PM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 1:30:36 PM"), ExpiresAt = 634003698369030440, Disabled = false, Guid = new Guid ("feebc79b-1867-42c9-a966-bbb448d78a44")},
++ new CacheItem {Key = "@@@InProc@A3D557581E229FAEA58A8D4F", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:50:36 PM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 1:30:36 PM"), ExpiresAt = 634003698369035640, Disabled = false, Guid = new Guid ("474193d1-4fd9-4b06-873a-e575744957a4")},
++ new CacheItem {Key = "@InMemoryOCP_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:30:46 PM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 1:30:36 PM"), ExpiresAt = 634003686469024010, Disabled = false, Guid = new Guid ("817d3f42-bf7b-4a13-90bc-1895cafe2d23")},
++ new CacheItem {Key = "@prefix@_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:30:46 PM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 1:30:36 PM"), ExpiresAt = 634003686469024010, Disabled = false, Guid = new Guid ("39402800-3c1e-478c-8bdc-571d902e32a7")},
++ new CacheItem {Key = "PartialCachingControl\nGUID: 19e19704-457b-4894-978c-63d6d022bf22\n", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:30:50 PM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 1:30:45 PM"), ExpiresAt = 634003686509800050, Disabled = false, Guid = new Guid ("b45b3bd3-d55d-4c41-b9da-150c19ec0856")},
++ new CacheItem {Key = "@@@InProc@A3D557581E229FAEA58A8D4F", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:50:45 PM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 1:30:45 PM"), ExpiresAt = 634003698459800810, Disabled = false, Guid = new Guid ("66bc962f-bf18-48a4-8164-722a5f53d211")},
++ new CacheItem {Key = "@@@InProc@A3D557581E229FAEA58A8D4F", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:50:45 PM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 1:30:45 PM"), ExpiresAt = 634003698459801130, Disabled = false, Guid = new Guid ("9096d210-ed15-4d38-9af2-26e59b0b8be0")},
++ new CacheItem {Key = "@InMemoryOCP_vbk/default.aspxGETWQNgVadmin_edituserNuV78FH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:30:55 PM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 1:30:45 PM"), ExpiresAt = 634003686559793540, Disabled = false, Guid = new Guid ("f7e86ec2-dc06-484f-81ed-df4373fff95b")},
++ new CacheItem {Key = "@prefix@_vbk/default.aspxGETWQNgVadmin_edituserNuV78FH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:30:55 PM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 1:30:45 PM"), ExpiresAt = 634003686559793540, Disabled = false, Guid = new Guid ("ad6319f5-27bc-4444-9eb8-1320009ab184")},
++ new CacheItem {Key = "@@@InProc@A3D557581E229FAEA58A8D4F", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:50:50 PM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 1:30:50 PM"), ExpiresAt = 634003698501880070, Disabled = false, Guid = new Guid ("4e49dc65-2c6a-4b2f-97e2-9cf09175c57a")},
++ new CacheItem {Key = "@@@InProc@A3D557581E229FAEA58A8D4F", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:50:50 PM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 1:30:50 PM"), ExpiresAt = 634003698501880320, Disabled = false, Guid = new Guid ("417fc6e2-b9ae-40eb-906b-6e41b306a908")},
++ new CacheItem {Key = "@InMemoryOCP_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:31:00 PM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 1:30:50 PM"), ExpiresAt = 634003686601873790, Disabled = false, Guid = new Guid ("7b0fb8c1-9642-4854-b979-7e223a092a3d")},
++ new CacheItem {Key = "@prefix@_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:31:00 PM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 1:30:50 PM"), ExpiresAt = 634003686601873790, Disabled = false, Guid = new Guid ("414bdd0b-ab30-4d61-aef2-2d34fd929ed2")},
++ new CacheItem {Key = "PartialCachingControl\nGUID: 19e19704-457b-4894-978c-63d6d022bf22\n", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:31:05 PM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 1:31:00 PM"), ExpiresAt = 634003686655460880, Disabled = false, Guid = new Guid ("c210ae2b-0c3d-4257-848d-f21ee48c02cc")},
++ new CacheItem {Key = "@@@InProc@A3D557581E229FAEA58A8D4F", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:51:00 PM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 1:31:00 PM"), ExpiresAt = 634003698605462050, Disabled = false, Guid = new Guid ("ac9cefe3-3331-4ee2-b0f1-69aaca2a955d")},
++ new CacheItem {Key = "@@@InProc@A3D557581E229FAEA58A8D4F", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:51:00 PM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("1/29/2010 1:31:00 PM"), ExpiresAt = 634003698605462460, Disabled = false, Guid = new Guid ("ae852a56-e081-4ee7-b360-81d4ba1a2000")},
++ new CacheItem {Key = "@InMemoryOCP_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:31:10 PM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 1:31:00 PM"), ExpiresAt = 634003686705453300, Disabled = false, Guid = new Guid ("e8b43015-cc9b-4cad-a881-faead4f18aa3")},
++ new CacheItem {Key = "@prefix@_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("1/29/2010 1:31:10 PM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("1/29/2010 1:31:00 PM"), ExpiresAt = 634003686705453300, Disabled = false, Guid = new Guid ("3866994b-3be5-4408-9077-529fe701d3f3")},
++ };
++ var queue = new CacheItemPriorityQueue ();
++ CacheItem item;
++
++ queue.Enqueue (list [0]);
++ Assert.AreEqual (1, queue.Count, "Enqueue-0000-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0000-2");
++
++ queue.Enqueue (list [1]);
++ Assert.AreEqual (2, queue.Count, "Enqueue-0001-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0001-2");
++
++ item = list [1];
++ Assert.IsNotNull (item, "Disable-0000-1");
++ Assert.AreEqual ("33191cc7-c1b4-4726-b428-64efb69a6c46", item.Guid.ToString(), "Disable-0000-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0000-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [2]);
++ Assert.AreEqual (3, queue.Count, "Enqueue-0002-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0002-2");
++
++ queue.Enqueue (list [3]);
++ Assert.AreEqual (4, queue.Count, "Enqueue-0003-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0003-2");
++
++ queue.Enqueue (list [4]);
++ Assert.AreEqual (5, queue.Count, "Enqueue-0004-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0004-2");
++
++ item = list [0];
++ Assert.IsNotNull (item, "Disable-0001-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", item.Guid.ToString(), "Disable-0001-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0001-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [5]);
++ Assert.AreEqual (6, queue.Count, "Enqueue-0005-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0005-2");
++
++ item = list [2];
++ Assert.IsNotNull (item, "Disable-0002-1");
++ Assert.AreEqual ("88bee6f1-09ac-4af2-9bc3-ebd619009377", item.Guid.ToString(), "Disable-0002-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0002-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [6]);
++ Assert.AreEqual (7, queue.Count, "Enqueue-0006-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0006-2");
++
++ item = list [6];
++ Assert.IsNotNull (item, "Disable-0003-1");
++ Assert.AreEqual ("986174eb-da85-4a7b-9919-cd0668db69bf", item.Guid.ToString(), "Disable-0003-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0003-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [7]);
++ Assert.AreEqual (8, queue.Count, "Enqueue-0007-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0007-2");
++
++ queue.Enqueue (list [8]);
++ Assert.AreEqual (9, queue.Count, "Enqueue-0008-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0008-2");
++
++ queue.Enqueue (list [9]);
++ Assert.AreEqual (10, queue.Count, "Enqueue-0009-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0009-2");
++
++ item = list [3];
++ Assert.IsNotNull (item, "Disable-0004-1");
++ Assert.AreEqual ("e290608d-7086-41a6-a87a-3f3051c14780", item.Guid.ToString(), "Disable-0004-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0004-3");
++ item.Disabled = true;
++
++ item = list [7];
++ Assert.IsNotNull (item, "Disable-0005-1");
++ Assert.AreEqual ("3c5fd8ab-a611-4bfb-afb0-5acee9b45dda", item.Guid.ToString(), "Disable-0005-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0005-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [10]);
++ Assert.AreEqual (11, queue.Count, "Enqueue-0010-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0010-2");
++
++ item = list [10];
++ Assert.IsNotNull (item, "Disable-0006-1");
++ Assert.AreEqual ("feebc79b-1867-42c9-a966-bbb448d78a44", item.Guid.ToString(), "Disable-0006-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0006-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [11]);
++ Assert.AreEqual (12, queue.Count, "Enqueue-0011-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0011-2");
++
++ queue.Enqueue (list [12]);
++ Assert.AreEqual (13, queue.Count, "Enqueue-0012-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0012-2");
++
++ queue.Enqueue (list [13]);
++ Assert.AreEqual (14, queue.Count, "Enqueue-0013-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0013-2");
++
++ item = list [8];
++ Assert.IsNotNull (item, "Disable-0007-1");
++ Assert.AreEqual ("2d354d5c-8996-4932-ba5f-cd3591fe95cb", item.Guid.ToString(), "Disable-0007-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0007-3");
++ item.Disabled = true;
++
++ item = list [5];
++ Assert.IsNotNull (item, "Disable-0008-1");
++ Assert.AreEqual ("94cc61f5-312e-4d03-8d56-4e8b400f8ca0", item.Guid.ToString(), "Disable-0008-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0008-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [14]);
++ Assert.AreEqual (15, queue.Count, "Enqueue-0014-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0014-2");
++
++ item = list [11];
++ Assert.IsNotNull (item, "Disable-0009-1");
++ Assert.AreEqual ("474193d1-4fd9-4b06-873a-e575744957a4", item.Guid.ToString(), "Disable-0009-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0009-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [15]);
++ Assert.AreEqual (16, queue.Count, "Enqueue-0015-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0015-2");
++
++ item = list [15];
++ Assert.IsNotNull (item, "Disable-0010-1");
++ Assert.AreEqual ("66bc962f-bf18-48a4-8164-722a5f53d211", item.Guid.ToString(), "Disable-0010-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0010-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [16]);
++ Assert.AreEqual (17, queue.Count, "Enqueue-0016-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0016-2");
++
++ queue.Enqueue (list [17]);
++ Assert.AreEqual (18, queue.Count, "Enqueue-0017-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0017-2");
++
++ queue.Enqueue (list [18]);
++ Assert.AreEqual (19, queue.Count, "Enqueue-0018-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0018-2");
++
++ item = list [12];
++ Assert.IsNotNull (item, "Disable-0011-1");
++ Assert.AreEqual ("817d3f42-bf7b-4a13-90bc-1895cafe2d23", item.Guid.ToString(), "Disable-0011-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0011-3");
++ item.Disabled = true;
++
++ item = list [16];
++ Assert.IsNotNull (item, "Disable-0012-1");
++ Assert.AreEqual ("9096d210-ed15-4d38-9af2-26e59b0b8be0", item.Guid.ToString(), "Disable-0012-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0012-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [19]);
++ Assert.AreEqual (20, queue.Count, "Enqueue-0019-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0019-2");
++
++ item = list [19];
++ Assert.IsNotNull (item, "Disable-0013-1");
++ Assert.AreEqual ("4e49dc65-2c6a-4b2f-97e2-9cf09175c57a", item.Guid.ToString(), "Disable-0013-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0013-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [20]);
++ Assert.AreEqual (21, queue.Count, "Enqueue-0020-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0020-2");
++
++ queue.Enqueue (list [21]);
++ Assert.AreEqual (22, queue.Count, "Enqueue-0021-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0021-2");
++
++ queue.Enqueue (list [22]);
++ Assert.AreEqual (23, queue.Count, "Enqueue-0022-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0022-2");
++
++ item = list [21];
++ Assert.IsNotNull (item, "Disable-0014-1");
++ Assert.AreEqual ("7b0fb8c1-9642-4854-b979-7e223a092a3d", item.Guid.ToString(), "Disable-0014-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0014-3");
++ item.Disabled = true;
++
++ item = list [14];
++ Assert.IsNotNull (item, "Disable-0015-1");
++ Assert.AreEqual ("b45b3bd3-d55d-4c41-b9da-150c19ec0856", item.Guid.ToString(), "Disable-0015-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0015-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [23]);
++ Assert.AreEqual (24, queue.Count, "Enqueue-0023-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0023-2");
++
++ item = list [20];
++ Assert.IsNotNull (item, "Disable-0016-1");
++ Assert.AreEqual ("417fc6e2-b9ae-40eb-906b-6e41b306a908", item.Guid.ToString(), "Disable-0016-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0016-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [24]);
++ Assert.AreEqual (25, queue.Count, "Enqueue-0024-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0024-2");
++
++ item = list [24];
++ Assert.IsNotNull (item, "Disable-0017-1");
++ Assert.AreEqual ("ac9cefe3-3331-4ee2-b0f1-69aaca2a955d", item.Guid.ToString(), "Disable-0017-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0017-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [25]);
++ Assert.AreEqual (26, queue.Count, "Enqueue-0025-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0025-2");
++
++ queue.Enqueue (list [26]);
++ Assert.AreEqual (27, queue.Count, "Enqueue-0026-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0026-2");
++
++ queue.Enqueue (list [27]);
++ Assert.AreEqual (28, queue.Count, "Enqueue-0027-1");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", queue.Peek ().Guid.ToString(), "Enqueue-0027-2");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0000-1");
++ Assert.AreEqual (27, queue.Count, "Dequeue-0000-2");
++ Assert.AreEqual ("3378afe8-5a2a-4f30-aedd-fa146880f93e", item.Guid.ToString (), "Dequeue-0000-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0000-4");
++
++ item = list [23];
++ Assert.IsNotNull (item, "Disable-0018-1");
++ Assert.AreEqual ("c210ae2b-0c3d-4257-848d-f21ee48c02cc", item.Guid.ToString(), "Disable-0018-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0018-3");
++ item.Disabled = true;
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0001-1");
++ Assert.AreEqual (26, queue.Count, "Dequeue-0001-2");
++ Assert.AreEqual ("e290608d-7086-41a6-a87a-3f3051c14780", item.Guid.ToString (), "Dequeue-0001-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0001-4");
++
++ item = list [26];
++ Assert.IsNotNull (item, "Disable-0019-1");
++ Assert.AreEqual ("e8b43015-cc9b-4cad-a881-faead4f18aa3", item.Guid.ToString(), "Disable-0019-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0019-3");
++ item.Disabled = true;
++
++ Assert.AreEqual (26, queue.Count, "Queue size after sequence");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0002-1");
++ Assert.AreEqual (25, queue.Count, "Dequeue-0002-2");
++ Assert.AreEqual ("f374c3d0-06a5-4b0d-8fb5-f0e94a876847", item.Guid.ToString (), "Dequeue-0002-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0002-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0003-1");
++ Assert.AreEqual (24, queue.Count, "Dequeue-0003-2");
++ Assert.AreEqual ("94cc61f5-312e-4d03-8d56-4e8b400f8ca0", item.Guid.ToString (), "Dequeue-0003-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0003-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0004-1");
++ Assert.AreEqual (23, queue.Count, "Dequeue-0004-2");
++ Assert.AreEqual ("2d354d5c-8996-4932-ba5f-cd3591fe95cb", item.Guid.ToString (), "Dequeue-0004-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0004-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0005-1");
++ Assert.AreEqual (22, queue.Count, "Dequeue-0005-2");
++ Assert.AreEqual ("93a0e663-0354-4301-ac27-9e782091f661", item.Guid.ToString (), "Dequeue-0005-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0005-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0006-1");
++ Assert.AreEqual (21, queue.Count, "Dequeue-0006-2");
++ Assert.AreEqual ("817d3f42-bf7b-4a13-90bc-1895cafe2d23", item.Guid.ToString (), "Dequeue-0006-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0006-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0007-1");
++ Assert.AreEqual (20, queue.Count, "Dequeue-0007-2");
++ Assert.AreEqual ("39402800-3c1e-478c-8bdc-571d902e32a7", item.Guid.ToString (), "Dequeue-0007-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0007-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0008-1");
++ Assert.AreEqual (19, queue.Count, "Dequeue-0008-2");
++ Assert.AreEqual ("b45b3bd3-d55d-4c41-b9da-150c19ec0856", item.Guid.ToString (), "Dequeue-0008-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0008-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0009-1");
++ Assert.AreEqual (18, queue.Count, "Dequeue-0009-2");
++ Assert.AreEqual ("f7e86ec2-dc06-484f-81ed-df4373fff95b", item.Guid.ToString (), "Dequeue-0009-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0009-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0010-1");
++ Assert.AreEqual (17, queue.Count, "Dequeue-0010-2");
++ Assert.AreEqual ("ad6319f5-27bc-4444-9eb8-1320009ab184", item.Guid.ToString (), "Dequeue-0010-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0010-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0011-1");
++ Assert.AreEqual (16, queue.Count, "Dequeue-0011-2");
++ Assert.AreEqual ("7b0fb8c1-9642-4854-b979-7e223a092a3d", item.Guid.ToString (), "Dequeue-0011-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0011-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0012-1");
++ Assert.AreEqual (15, queue.Count, "Dequeue-0012-2");
++ Assert.AreEqual ("414bdd0b-ab30-4d61-aef2-2d34fd929ed2", item.Guid.ToString (), "Dequeue-0012-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0012-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0013-1");
++ Assert.AreEqual (14, queue.Count, "Dequeue-0013-2");
++ Assert.AreEqual ("c210ae2b-0c3d-4257-848d-f21ee48c02cc", item.Guid.ToString (), "Dequeue-0013-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0013-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0014-1");
++ Assert.AreEqual (13, queue.Count, "Dequeue-0014-2");
++ Assert.AreEqual ("e8b43015-cc9b-4cad-a881-faead4f18aa3", item.Guid.ToString (), "Dequeue-0014-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0014-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0015-1");
++ Assert.AreEqual (12, queue.Count, "Dequeue-0015-2");
++ Assert.AreEqual ("3866994b-3be5-4408-9077-529fe701d3f3", item.Guid.ToString (), "Dequeue-0015-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0015-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0016-1");
++ Assert.AreEqual (11, queue.Count, "Dequeue-0016-2");
++ Assert.AreEqual ("33191cc7-c1b4-4726-b428-64efb69a6c46", item.Guid.ToString (), "Dequeue-0016-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0016-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0017-1");
++ Assert.AreEqual (10, queue.Count, "Dequeue-0017-2");
++ Assert.AreEqual ("88bee6f1-09ac-4af2-9bc3-ebd619009377", item.Guid.ToString (), "Dequeue-0017-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0017-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0018-1");
++ Assert.AreEqual (9, queue.Count, "Dequeue-0018-2");
++ Assert.AreEqual ("986174eb-da85-4a7b-9919-cd0668db69bf", item.Guid.ToString (), "Dequeue-0018-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0018-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0019-1");
++ Assert.AreEqual (8, queue.Count, "Dequeue-0019-2");
++ Assert.AreEqual ("3c5fd8ab-a611-4bfb-afb0-5acee9b45dda", item.Guid.ToString (), "Dequeue-0019-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0019-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0020-1");
++ Assert.AreEqual (7, queue.Count, "Dequeue-0020-2");
++ Assert.AreEqual ("feebc79b-1867-42c9-a966-bbb448d78a44", item.Guid.ToString (), "Dequeue-0020-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0020-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0021-1");
++ Assert.AreEqual (6, queue.Count, "Dequeue-0021-2");
++ Assert.AreEqual ("474193d1-4fd9-4b06-873a-e575744957a4", item.Guid.ToString (), "Dequeue-0021-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0021-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0022-1");
++ Assert.AreEqual (5, queue.Count, "Dequeue-0022-2");
++ Assert.AreEqual ("66bc962f-bf18-48a4-8164-722a5f53d211", item.Guid.ToString (), "Dequeue-0022-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0022-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0023-1");
++ Assert.AreEqual (4, queue.Count, "Dequeue-0023-2");
++ Assert.AreEqual ("9096d210-ed15-4d38-9af2-26e59b0b8be0", item.Guid.ToString (), "Dequeue-0023-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0023-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0024-1");
++ Assert.AreEqual (3, queue.Count, "Dequeue-0024-2");
++ Assert.AreEqual ("4e49dc65-2c6a-4b2f-97e2-9cf09175c57a", item.Guid.ToString (), "Dequeue-0024-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0024-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0025-1");
++ Assert.AreEqual (2, queue.Count, "Dequeue-0025-2");
++ Assert.AreEqual ("417fc6e2-b9ae-40eb-906b-6e41b306a908", item.Guid.ToString (), "Dequeue-0025-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0025-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0026-1");
++ Assert.AreEqual (1, queue.Count, "Dequeue-0026-2");
++ Assert.AreEqual ("ac9cefe3-3331-4ee2-b0f1-69aaca2a955d", item.Guid.ToString (), "Dequeue-0026-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0026-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0027-1");
++ Assert.AreEqual (0, queue.Count, "Dequeue-0027-2");
++ Assert.AreEqual ("ae852a56-e081-4ee7-b360-81d4ba1a2000", item.Guid.ToString (), "Dequeue-0027-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0027-4");
++
++ }
++
++ [Test (Description="Generated from sequence file cache_pq_sequence_2010-02-03_01:07:55.seq")]
++ public void Sequence_0004 ()
++ {
++ var list = new List <CacheItem> {
++ new CacheItem {Key = "PartialCachingControl\nGUID: f11febcc-d445-4036-bb93-aa3932ceb4ef\n", AbsoluteExpiration = DateTime.Parse ("2/3/2010 2:06:39 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("2/3/2010 2:06:34 AM"), ExpiresAt = 634007595994690560, Disabled = false, Guid = new Guid ("757dc15a-3340-4704-9292-17f3004e2ee5")},
++ new CacheItem {Key = "@@@InProc@B748F7C2AA1F04BCF40EAB40", AbsoluteExpiration = DateTime.Parse ("2/3/2010 2:26:34 AM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("2/3/2010 2:06:34 AM"), ExpiresAt = 634007607944742000, Disabled = false, Guid = new Guid ("a4778103-c8e9-4304-90db-3f54b718e50a")},
++ new CacheItem {Key = "@@@InProc@B748F7C2AA1F04BCF40EAB40", AbsoluteExpiration = DateTime.Parse ("2/3/2010 2:26:34 AM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("2/3/2010 2:06:34 AM"), ExpiresAt = 634007607944758990, Disabled = false, Guid = new Guid ("246d4b59-6748-4bef-8f78-5b081b0686f1")},
++ new CacheItem {Key = "@InMemoryOCP_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("2/3/2010 2:06:42 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("2/3/2010 2:06:34 AM"), ExpiresAt = 634007596029748620, Disabled = false, Guid = new Guid ("46616129-bd8d-402b-954f-a05944535e23")},
++ new CacheItem {Key = "@prefix@_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("2/3/2010 2:06:42 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("2/3/2010 2:06:34 AM"), ExpiresAt = 634007596029748620, Disabled = false, Guid = new Guid ("f85a0942-6f20-4f71-ae57-3b2669052460")},
++ new CacheItem {Key = "PartialCachingControl\nGUID: f11febcc-d445-4036-bb93-aa3932ceb4ef\n", AbsoluteExpiration = DateTime.Parse ("2/3/2010 2:06:58 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("2/3/2010 2:06:53 AM"), ExpiresAt = 634007596187154840, Disabled = false, Guid = new Guid ("e8b1f7d4-a874-4b56-84ce-1434a72f9d35")},
++ new CacheItem {Key = "@@@InProc@B748F7C2AA1F04BCF40EAB40", AbsoluteExpiration = DateTime.Parse ("2/3/2010 2:26:53 AM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("2/3/2010 2:06:53 AM"), ExpiresAt = 634007608137155850, Disabled = false, Guid = new Guid ("bc16a289-5ce4-436f-9791-1885f033bc6e")},
++ new CacheItem {Key = "@@@InProc@B748F7C2AA1F04BCF40EAB40", AbsoluteExpiration = DateTime.Parse ("2/3/2010 2:26:53 AM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("2/3/2010 2:06:53 AM"), ExpiresAt = 634007608137156090, Disabled = false, Guid = new Guid ("f6651f9b-36fd-481d-bb31-8abc3d110a45")},
++ new CacheItem {Key = "@InMemoryOCP_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("2/3/2010 2:07:03 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("2/3/2010 2:06:53 AM"), ExpiresAt = 634007596237139120, Disabled = false, Guid = new Guid ("226ef04f-1118-4225-abe1-43d6e228db95")},
++ new CacheItem {Key = "@prefix@_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("2/3/2010 2:07:03 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("2/3/2010 2:06:53 AM"), ExpiresAt = 634007596237139120, Disabled = false, Guid = new Guid ("9df2ed49-168b-4769-8d9e-7f963e62123c")},
++ new CacheItem {Key = "PartialCachingControl\nGUID: f11febcc-d445-4036-bb93-aa3932ceb4ef\n", AbsoluteExpiration = DateTime.Parse ("2/3/2010 2:07:30 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("2/3/2010 2:07:25 AM"), ExpiresAt = 634007596504393570, Disabled = false, Guid = new Guid ("30952e54-d94b-450d-b1ff-5e74c66bb4f5")},
++ new CacheItem {Key = "@@@InProc@B748F7C2AA1F04BCF40EAB40", AbsoluteExpiration = DateTime.Parse ("2/3/2010 2:27:25 AM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("2/3/2010 2:07:25 AM"), ExpiresAt = 634007608454399100, Disabled = false, Guid = new Guid ("e50d5a73-7861-412b-b9ad-924c13c2e9c5")},
++ new CacheItem {Key = "@@@InProc@B748F7C2AA1F04BCF40EAB40", AbsoluteExpiration = DateTime.Parse ("2/3/2010 2:27:25 AM"), SlidingExpiration = TimeSpan.Parse ("00:20:00"), Priority = CacheItemPriority.AboveNormal, LastChange = DateTime.Parse ("2/3/2010 2:07:25 AM"), ExpiresAt = 634007608454399320, Disabled = false, Guid = new Guid ("631452f5-a8e5-483e-a0ac-9c3f7abd37a1")},
++ new CacheItem {Key = "@InMemoryOCP_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("2/3/2010 2:07:35 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("2/3/2010 2:07:25 AM"), ExpiresAt = 634007596554387900, Disabled = false, Guid = new Guid ("01a63c0e-5963-4eac-8b0e-b1b2ea508098")},
++ new CacheItem {Key = "@prefix@_vbk/default.aspxGETWQFH", AbsoluteExpiration = DateTime.Parse ("2/3/2010 2:07:35 AM"), SlidingExpiration = TimeSpan.Parse ("00:00:00"), Priority = CacheItemPriority.Normal, LastChange = DateTime.Parse ("2/3/2010 2:07:25 AM"), ExpiresAt = 634007596554387900, Disabled = false, Guid = new Guid ("9e38cf23-6785-49e8-9922-8e1c1d86a205")},
++ };
++ var queue = new CacheItemPriorityQueue ();
++ CacheItem item;
++
++ queue.Enqueue (list [0]);
++ Assert.AreEqual (1, queue.Count, "Enqueue-0000-1");
++ Assert.AreEqual ("757dc15a-3340-4704-9292-17f3004e2ee5", queue.Peek ().Guid.ToString(), "Enqueue-0000-2");
++
++ queue.Enqueue (list [1]);
++ Assert.AreEqual (2, queue.Count, "Enqueue-0001-1");
++ Assert.AreEqual ("757dc15a-3340-4704-9292-17f3004e2ee5", queue.Peek ().Guid.ToString(), "Enqueue-0001-2");
++
++ item = list [1];
++ Assert.IsNotNull (item, "Disable-0000-1");
++ Assert.AreEqual ("a4778103-c8e9-4304-90db-3f54b718e50a", item.Guid.ToString(), "Disable-0000-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0000-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [2]);
++ Assert.AreEqual (3, queue.Count, "Enqueue-0002-1");
++ Assert.AreEqual ("757dc15a-3340-4704-9292-17f3004e2ee5", queue.Peek ().Guid.ToString(), "Enqueue-0002-2");
++
++ queue.Enqueue (list [3]);
++ Assert.AreEqual (4, queue.Count, "Enqueue-0003-1");
++ Assert.AreEqual ("757dc15a-3340-4704-9292-17f3004e2ee5", queue.Peek ().Guid.ToString(), "Enqueue-0003-2");
++
++ queue.Enqueue (list [4]);
++ Assert.AreEqual (5, queue.Count, "Enqueue-0004-1");
++ Assert.AreEqual ("757dc15a-3340-4704-9292-17f3004e2ee5", queue.Peek ().Guid.ToString(), "Enqueue-0004-2");
++
++ item = queue.Peek ();
++ Assert.IsNotNull (item, "Peek-0000-1");
++ Assert.AreEqual (5, queue.Count, "Peek-0000-2");
++ Assert.AreEqual ("757dc15a-3340-4704-9292-17f3004e2ee5", item.Guid.ToString (), "Peek-0000-3");
++ Assert.AreEqual (false, item.Disabled, "Peek-0000-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0000-1");
++ Assert.AreEqual (4, queue.Count, "Dequeue-0000-2");
++ Assert.AreEqual ("757dc15a-3340-4704-9292-17f3004e2ee5", item.Guid.ToString (), "Dequeue-0000-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0000-4");
++
++ item = list [0];
++ Assert.IsNotNull (item, "Disable-0001-1");
++ Assert.AreEqual ("757dc15a-3340-4704-9292-17f3004e2ee5", item.Guid.ToString(), "Disable-0001-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0001-3");
++ item.Disabled = true;
++
++ item = queue.Peek ();
++ Assert.IsNotNull (item, "Peek-0001-1");
++ Assert.AreEqual (4, queue.Count, "Peek-0001-2");
++ Assert.AreEqual ("f85a0942-6f20-4f71-ae57-3b2669052460", item.Guid.ToString (), "Peek-0001-3");
++ Assert.AreEqual (false, item.Disabled, "Peek-0001-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0001-1");
++ Assert.AreEqual (3, queue.Count, "Dequeue-0001-2");
++ Assert.AreEqual ("f85a0942-6f20-4f71-ae57-3b2669052460", item.Guid.ToString (), "Dequeue-0001-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0001-4");
++
++ item = list [4];
++ Assert.IsNotNull (item, "Disable-0002-1");
++ Assert.AreEqual ("f85a0942-6f20-4f71-ae57-3b2669052460", item.Guid.ToString(), "Disable-0002-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0002-3");
++ item.Disabled = true;
++
++ item = queue.Peek ();
++ Assert.IsNotNull (item, "Peek-0002-1");
++ Assert.AreEqual (3, queue.Count, "Peek-0002-2");
++ Assert.AreEqual ("46616129-bd8d-402b-954f-a05944535e23", item.Guid.ToString (), "Peek-0002-3");
++ Assert.AreEqual (false, item.Disabled, "Peek-0002-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0002-1");
++ Assert.AreEqual (2, queue.Count, "Dequeue-0002-2");
++ Assert.AreEqual ("46616129-bd8d-402b-954f-a05944535e23", item.Guid.ToString (), "Dequeue-0002-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0002-4");
++
++ item = list [3];
++ Assert.IsNotNull (item, "Disable-0003-1");
++ Assert.AreEqual ("46616129-bd8d-402b-954f-a05944535e23", item.Guid.ToString(), "Disable-0003-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0003-3");
++ item.Disabled = true;
++
++ item = queue.Peek ();
++ Assert.IsNotNull (item, "Peek-0003-1");
++ Assert.AreEqual (2, queue.Count, "Peek-0003-2");
++ Assert.AreEqual ("a4778103-c8e9-4304-90db-3f54b718e50a", item.Guid.ToString (), "Peek-0003-3");
++ Assert.AreEqual (true, item.Disabled, "Peek-0003-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0003-1");
++ Assert.AreEqual (1, queue.Count, "Dequeue-0003-2");
++ Assert.AreEqual ("a4778103-c8e9-4304-90db-3f54b718e50a", item.Guid.ToString (), "Dequeue-0003-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0003-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0004-1");
++ Assert.AreEqual (0, queue.Count, "Dequeue-0004-2");
++ Assert.AreEqual ("246d4b59-6748-4bef-8f78-5b081b0686f1", item.Guid.ToString (), "Dequeue-0004-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0004-4");
++
++ queue.Enqueue (list [5]);
++ Assert.AreEqual (1, queue.Count, "Enqueue-0005-1");
++ Assert.AreEqual ("e8b1f7d4-a874-4b56-84ce-1434a72f9d35", queue.Peek ().Guid.ToString(), "Enqueue-0005-2");
++
++ item = list [2];
++ Assert.IsNotNull (item, "Disable-0004-1");
++ Assert.AreEqual ("246d4b59-6748-4bef-8f78-5b081b0686f1", item.Guid.ToString(), "Disable-0004-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0004-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [6]);
++ Assert.AreEqual (2, queue.Count, "Enqueue-0006-1");
++ Assert.AreEqual ("e8b1f7d4-a874-4b56-84ce-1434a72f9d35", queue.Peek ().Guid.ToString(), "Enqueue-0006-2");
++
++ item = list [6];
++ Assert.IsNotNull (item, "Disable-0005-1");
++ Assert.AreEqual ("bc16a289-5ce4-436f-9791-1885f033bc6e", item.Guid.ToString(), "Disable-0005-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0005-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [7]);
++ Assert.AreEqual (3, queue.Count, "Enqueue-0007-1");
++ Assert.AreEqual ("e8b1f7d4-a874-4b56-84ce-1434a72f9d35", queue.Peek ().Guid.ToString(), "Enqueue-0007-2");
++
++ queue.Enqueue (list [8]);
++ Assert.AreEqual (4, queue.Count, "Enqueue-0008-1");
++ Assert.AreEqual ("e8b1f7d4-a874-4b56-84ce-1434a72f9d35", queue.Peek ().Guid.ToString(), "Enqueue-0008-2");
++
++ queue.Enqueue (list [9]);
++ Assert.AreEqual (5, queue.Count, "Enqueue-0009-1");
++ Assert.AreEqual ("e8b1f7d4-a874-4b56-84ce-1434a72f9d35", queue.Peek ().Guid.ToString(), "Enqueue-0009-2");
++
++ item = queue.Peek ();
++ Assert.IsNotNull (item, "Peek-0004-1");
++ Assert.AreEqual (5, queue.Count, "Peek-0004-2");
++ Assert.AreEqual ("e8b1f7d4-a874-4b56-84ce-1434a72f9d35", item.Guid.ToString (), "Peek-0004-3");
++ Assert.AreEqual (false, item.Disabled, "Peek-0004-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0005-1");
++ Assert.AreEqual (4, queue.Count, "Dequeue-0005-2");
++ Assert.AreEqual ("e8b1f7d4-a874-4b56-84ce-1434a72f9d35", item.Guid.ToString (), "Dequeue-0005-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0005-4");
++
++ item = list [5];
++ Assert.IsNotNull (item, "Disable-0006-1");
++ Assert.AreEqual ("e8b1f7d4-a874-4b56-84ce-1434a72f9d35", item.Guid.ToString(), "Disable-0006-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0006-3");
++ item.Disabled = true;
++
++ item = queue.Peek ();
++ Assert.IsNotNull (item, "Peek-0005-1");
++ Assert.AreEqual (4, queue.Count, "Peek-0005-2");
++ Assert.AreEqual ("9df2ed49-168b-4769-8d9e-7f963e62123c", item.Guid.ToString (), "Peek-0005-3");
++ Assert.AreEqual (false, item.Disabled, "Peek-0005-4");
++
++ item = queue.Peek ();
++ Assert.IsNotNull (item, "Peek-0006-1");
++ Assert.AreEqual (4, queue.Count, "Peek-0006-2");
++ Assert.AreEqual ("9df2ed49-168b-4769-8d9e-7f963e62123c", item.Guid.ToString (), "Peek-0006-3");
++ Assert.AreEqual (false, item.Disabled, "Peek-0006-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0006-1");
++ Assert.AreEqual (3, queue.Count, "Dequeue-0006-2");
++ Assert.AreEqual ("9df2ed49-168b-4769-8d9e-7f963e62123c", item.Guid.ToString (), "Dequeue-0006-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0006-4");
++
++ item = list [9];
++ Assert.IsNotNull (item, "Disable-0007-1");
++ Assert.AreEqual ("9df2ed49-168b-4769-8d9e-7f963e62123c", item.Guid.ToString(), "Disable-0007-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0007-3");
++ item.Disabled = true;
++
++ item = queue.Peek ();
++ Assert.IsNotNull (item, "Peek-0007-1");
++ Assert.AreEqual (3, queue.Count, "Peek-0007-2");
++ Assert.AreEqual ("226ef04f-1118-4225-abe1-43d6e228db95", item.Guid.ToString (), "Peek-0007-3");
++ Assert.AreEqual (false, item.Disabled, "Peek-0007-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0007-1");
++ Assert.AreEqual (2, queue.Count, "Dequeue-0007-2");
++ Assert.AreEqual ("226ef04f-1118-4225-abe1-43d6e228db95", item.Guid.ToString (), "Dequeue-0007-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0007-4");
++
++ item = list [8];
++ Assert.IsNotNull (item, "Disable-0008-1");
++ Assert.AreEqual ("226ef04f-1118-4225-abe1-43d6e228db95", item.Guid.ToString(), "Disable-0008-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0008-3");
++ item.Disabled = true;
++
++ item = queue.Peek ();
++ Assert.IsNotNull (item, "Peek-0008-1");
++ Assert.AreEqual (2, queue.Count, "Peek-0008-2");
++ Assert.AreEqual ("bc16a289-5ce4-436f-9791-1885f033bc6e", item.Guid.ToString (), "Peek-0008-3");
++ Assert.AreEqual (true, item.Disabled, "Peek-0008-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0008-1");
++ Assert.AreEqual (1, queue.Count, "Dequeue-0008-2");
++ Assert.AreEqual ("bc16a289-5ce4-436f-9791-1885f033bc6e", item.Guid.ToString (), "Dequeue-0008-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0008-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0009-1");
++ Assert.AreEqual (0, queue.Count, "Dequeue-0009-2");
++ Assert.AreEqual ("f6651f9b-36fd-481d-bb31-8abc3d110a45", item.Guid.ToString (), "Dequeue-0009-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0009-4");
++
++ queue.Enqueue (list [10]);
++ Assert.AreEqual (1, queue.Count, "Enqueue-0010-1");
++ Assert.AreEqual ("30952e54-d94b-450d-b1ff-5e74c66bb4f5", queue.Peek ().Guid.ToString(), "Enqueue-0010-2");
++
++ item = list [7];
++ Assert.IsNotNull (item, "Disable-0009-1");
++ Assert.AreEqual ("f6651f9b-36fd-481d-bb31-8abc3d110a45", item.Guid.ToString(), "Disable-0009-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0009-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [11]);
++ Assert.AreEqual (2, queue.Count, "Enqueue-0011-1");
++ Assert.AreEqual ("30952e54-d94b-450d-b1ff-5e74c66bb4f5", queue.Peek ().Guid.ToString(), "Enqueue-0011-2");
++
++ item = list [11];
++ Assert.IsNotNull (item, "Disable-0010-1");
++ Assert.AreEqual ("e50d5a73-7861-412b-b9ad-924c13c2e9c5", item.Guid.ToString(), "Disable-0010-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0010-3");
++ item.Disabled = true;
++
++ queue.Enqueue (list [12]);
++ Assert.AreEqual (3, queue.Count, "Enqueue-0012-1");
++ Assert.AreEqual ("30952e54-d94b-450d-b1ff-5e74c66bb4f5", queue.Peek ().Guid.ToString(), "Enqueue-0012-2");
++
++ queue.Enqueue (list [13]);
++ Assert.AreEqual (4, queue.Count, "Enqueue-0013-1");
++ Assert.AreEqual ("30952e54-d94b-450d-b1ff-5e74c66bb4f5", queue.Peek ().Guid.ToString(), "Enqueue-0013-2");
++
++ queue.Enqueue (list [14]);
++ Assert.AreEqual (5, queue.Count, "Enqueue-0014-1");
++ Assert.AreEqual ("30952e54-d94b-450d-b1ff-5e74c66bb4f5", queue.Peek ().Guid.ToString(), "Enqueue-0014-2");
++
++ item = queue.Peek ();
++ Assert.IsNotNull (item, "Peek-0009-1");
++ Assert.AreEqual (5, queue.Count, "Peek-0009-2");
++ Assert.AreEqual ("30952e54-d94b-450d-b1ff-5e74c66bb4f5", item.Guid.ToString (), "Peek-0009-3");
++ Assert.AreEqual (false, item.Disabled, "Peek-0009-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0010-1");
++ Assert.AreEqual (4, queue.Count, "Dequeue-0010-2");
++ Assert.AreEqual ("30952e54-d94b-450d-b1ff-5e74c66bb4f5", item.Guid.ToString (), "Dequeue-0010-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0010-4");
++
++ item = list [10];
++ Assert.IsNotNull (item, "Disable-0011-1");
++ Assert.AreEqual ("30952e54-d94b-450d-b1ff-5e74c66bb4f5", item.Guid.ToString(), "Disable-0011-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0011-3");
++ item.Disabled = true;
++
++ item = queue.Peek ();
++ Assert.IsNotNull (item, "Peek-0010-1");
++ Assert.AreEqual (4, queue.Count, "Peek-0010-2");
++ Assert.AreEqual ("9e38cf23-6785-49e8-9922-8e1c1d86a205", item.Guid.ToString (), "Peek-0010-3");
++ Assert.AreEqual (false, item.Disabled, "Peek-0010-4");
++
++ item = queue.Peek ();
++ Assert.IsNotNull (item, "Peek-0011-1");
++ Assert.AreEqual (4, queue.Count, "Peek-0011-2");
++ Assert.AreEqual ("9e38cf23-6785-49e8-9922-8e1c1d86a205", item.Guid.ToString (), "Peek-0011-3");
++ Assert.AreEqual (false, item.Disabled, "Peek-0011-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0011-1");
++ Assert.AreEqual (3, queue.Count, "Dequeue-0011-2");
++ Assert.AreEqual ("9e38cf23-6785-49e8-9922-8e1c1d86a205", item.Guid.ToString (), "Dequeue-0011-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0011-4");
++
++ item = list [14];
++ Assert.IsNotNull (item, "Disable-0012-1");
++ Assert.AreEqual ("9e38cf23-6785-49e8-9922-8e1c1d86a205", item.Guid.ToString(), "Disable-0012-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0012-3");
++ item.Disabled = true;
++
++ item = queue.Peek ();
++ Assert.IsNotNull (item, "Peek-0012-1");
++ Assert.AreEqual (3, queue.Count, "Peek-0012-2");
++ Assert.AreEqual ("01a63c0e-5963-4eac-8b0e-b1b2ea508098", item.Guid.ToString (), "Peek-0012-3");
++ Assert.AreEqual (false, item.Disabled, "Peek-0012-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0012-1");
++ Assert.AreEqual (2, queue.Count, "Dequeue-0012-2");
++ Assert.AreEqual ("01a63c0e-5963-4eac-8b0e-b1b2ea508098", item.Guid.ToString (), "Dequeue-0012-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0012-4");
++
++ item = list [13];
++ Assert.IsNotNull (item, "Disable-0013-1");
++ Assert.AreEqual ("01a63c0e-5963-4eac-8b0e-b1b2ea508098", item.Guid.ToString(), "Disable-0013-3");
++ Assert.AreEqual (false, item.Disabled, "Disable-0013-3");
++ item.Disabled = true;
++
++ item = queue.Peek ();
++ Assert.IsNotNull (item, "Peek-0013-1");
++ Assert.AreEqual (2, queue.Count, "Peek-0013-2");
++ Assert.AreEqual ("e50d5a73-7861-412b-b9ad-924c13c2e9c5", item.Guid.ToString (), "Peek-0013-3");
++ Assert.AreEqual (true, item.Disabled, "Peek-0013-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0013-1");
++ Assert.AreEqual (1, queue.Count, "Dequeue-0013-2");
++ Assert.AreEqual ("e50d5a73-7861-412b-b9ad-924c13c2e9c5", item.Guid.ToString (), "Dequeue-0013-3");
++ Assert.AreEqual (true, item.Disabled, "Dequeue-0013-4");
++
++ item = queue.Dequeue ();
++ Assert.IsNotNull (item, "Dequeue-0014-1");
++ Assert.AreEqual (0, queue.Count, "Dequeue-0014-2");
++ Assert.AreEqual ("631452f5-a8e5-483e-a0ac-9c3f7abd37a1", item.Guid.ToString (), "Dequeue-0014-3");
++ Assert.AreEqual (false, item.Disabled, "Dequeue-0014-4");
++
++ Assert.AreEqual (0, queue.Count, "Queue size after sequence");
++
++ }
++ }
++}
++#endif
++
++2010-02-03 Marek Habersack <mhabersack@novell.com>
++
++ * CacheItemPriorityQueueTest_generated.cs: added
++
++ * CacheItemPriorityQueueTest.cs: added
++
2010-01-25 Marek Habersack <mhabersack@novell.com>
* SqlCacheDependencyTest.cs: added
--- /dev/null
--- /dev/null
++// Authors:
++// Marek Habersack <mhabersack@novell.com>
++//
++// Copyright (C) 2010 Novell Inc. http://novell.com
++//
++
++//
++// Permission is hereby granted, free of charge, to any person obtaining
++// a copy of this software and associated documentation files (the
++// "Software"), to deal in the Software without restriction, including
++// without limitation the rights to use, copy, modify, merge, publish,
++// distribute, sublicense, and/or sell copies of the Software, and to
++// permit persons to whom the Software is furnished to do so, subject to
++// the following conditions:
++//
++// The above copyright notice and this permission notice shall be
++// included in all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++//
++
++using System;
++using System.Web;
++using System.Web.Caching;
++
++using NUnit.Framework;
++using MonoTests.Common;
++
++namespace MonoTests.System.Web
++{
++ [TestFixture]
++ public class HttpApplicationTest
++ {
++#if NET_4_0
++ [Test]
++ public void GetOutputCacheProviderName ()
++ {
++ var app = new HttpApplication ();
++
++ Assert.AreEqual ("AspNetInternalProvider", app.GetOutputCacheProviderName (null), "#A1");
++ }
++#endif
++ }
++}
++2010-02-04 Marek Habersack <mhabersack@novell.com>
++
++ * Helpers.cs: added a helper method for checking of HTML mentions
++ any .NET exceptions.
++
2010-01-19 Marek Habersack <mhabersack@novell.com>
* TestRunner.cs: Run makes sure Uri parser is passed a full url,
return sb.ToString ();
}
++
++ public static bool HasException (string html, Type exceptionType)
++ {
++ if (exceptionType == null)
++ throw new ArgumentNullException ("exceptionType");
++
++ return HasException (html, exceptionType.FullName);
++ }
++
++ public static bool HasException (string html, string exceptionType)
++ {
++ if (String.IsNullOrEmpty (exceptionType))
++ throw new ArgumentNullException ("exceptionType");
++
++ if (String.IsNullOrEmpty (html))
++ return false;
++
++ return html.IndexOf ("[" + exceptionType + "]:") != -1;
++ }
}
}
--- /dev/null
--- /dev/null
++//
++// Authors:
++// Marek Habersack (mhabersack@novell.com)
++//
++// (C) 2010 Novell, Inc http://novell.com/
++//
++
++//
++// Permission is hereby granted, free of charge, to any person obtaining
++// a copy of this software and associated documentation files (the
++// "Software"), to deal in the Software without restriction, including
++// without limitation the rights to use, copy, modify, merge, publish,
++// distribute, sublicense, and/or sell copies of the Software, and to
++// permit persons to whom the Software is furnished to do so, subject to
++// the following conditions:
++//
++// The above copyright notice and this permission notice shall be
++// included in all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++//
++#if NET_4_0
++using System;
++using System.Collections.Generic;
++using System.Configuration;
++using System.Configuration.Provider;
++using System.IO;
++using System.Web;
++using System.Web.Hosting;
++
++using StandAloneRunnerSupport;
++using StandAloneTests;
++
++using NUnit.Framework;
++
++namespace StandAloneTests.OutputCacheProvider
++{
++ [TestCase ("OutputCacheProvider 01", "OutputCacheProvider - custom provider test")]
++ public sealed class OutputCacheProvider_01 : ITestCase
++ {
++ public string PhysicalPath {
++ get {
++ return Path.Combine (
++ Consts.BasePhysicalDir,
++ Path.Combine ("OutputCacheProvider", "OutputCacheProviderTest_01")
++ );
++ }
++ }
++
++ public string VirtualPath {
++ get { return "/"; }
++ }
++
++ public bool SetUp (List <TestRunItem> runItems)
++ {
++ runItems.Add (new TestRunItem ("/Default.aspx", Default_Aspx));
++
++ return true;
++ }
++
++ void Default_Aspx (string result)
++ {
++ string originalHtml = @"<pre id=""output"">Default provider name: TestInMemoryProvider
++Null context: TestInMemoryProvider
++Default context: TestInMemoryProvider
++</pre>";
++
++ Helpers.ExtractAndCompareCodeFromHtml (result, originalHtml, "#A1");
++ }
++ }
++
++ [TestCase ("OutputCacheProvider 02", "OutputCacheProvider - missing provider test")]
++ public sealed class OutputCacheProvider_02 : ITestCase
++ {
++ public string PhysicalPath {
++ get {
++ return Path.Combine (
++ Consts.BasePhysicalDir,
++ Path.Combine ("OutputCacheProvider", "OutputCacheProviderTest_02")
++ );
++ }
++ }
++
++ public string VirtualPath {
++ get { return "/"; }
++ }
++
++ public bool SetUp (List <TestRunItem> runItems)
++ {
++ runItems.Add (new TestRunItem ("/Default.aspx", Default_Aspx));
++
++ return true;
++ }
++
++ void Default_Aspx (string result)
++ {
++ Assert.IsTrue (Helpers.HasException (result, typeof (ConfigurationErrorsException)), "#A1");
++ }
++ }
++
++ [TestCase ("OutputCacheProvider 03", "OutputCacheProvider - per request provider test")]
++ public sealed class OutputCacheProvider_03 : ITestCase
++ {
++ public string PhysicalPath {
++ get {
++ return Path.Combine (
++ Consts.BasePhysicalDir,
++ Path.Combine ("OutputCacheProvider", "OutputCacheProviderTest_03")
++ );
++ }
++ }
++
++ public string VirtualPath {
++ get { return "/"; }
++ }
++
++ public bool SetUp (List <TestRunItem> runItems)
++ {
++ runItems.Add (new TestRunItem ("/Default.aspx", Default_Aspx));
++ runItems.Add (new TestRunItem ("/Default.aspx?ocp=InMemory", Default_InMemory_Aspx));
++ runItems.Add (new TestRunItem ("/Default.aspx?ocp=AnotherInMemory", Default_AnotherInMemory_Aspx));
++ runItems.Add (new TestRunItem ("/Default.aspx?ocp=invalid", Default_Invalid_Aspx));
++
++ return true;
++ }
++
++ void Default_Aspx (string result)
++ {
++ string originalHtml = @"<pre id=""output"">Default provider name: AspNetInternalProvider
++Default context: AspNetInternalProvider
++</pre>";
++
++ Helpers.ExtractAndCompareCodeFromHtml (result, originalHtml, "#A1");
++ }
++
++ void Default_InMemory_Aspx (string result)
++ {
++ string originalHtml = @"<pre id=""output"">Default provider name: AspNetInternalProvider
++Default context: TestInMemoryProvider
++</pre>";
++
++ Helpers.ExtractAndCompareCodeFromHtml (result, originalHtml, "#A1");
++ }
++
++ void Default_AnotherInMemory_Aspx (string result)
++ {
++ string originalHtml = @"<pre id=""output"">Default provider name: AspNetInternalProvider
++Default context: TestAnotherInMemoryProvider
++</pre>";
++
++ Helpers.ExtractAndCompareCodeFromHtml (result, originalHtml, "#A1");
++ }
++
++ void Default_Invalid_Aspx (string result)
++ {
++ Assert.IsTrue (Helpers.HasException (result, typeof (ProviderException)), "#A1");
++ }
++ }
++}
++#endif
--- /dev/null
--- /dev/null
++using System;
++using System.Collections.Generic;
++using System.Configuration;
++using System.Linq;
++using System.Web;
++using System.Web.Caching;
++
++namespace Test
++{
++ public class InMemoryProvider : OutputCacheProvider
++ {
++ Dictionary<string, object> cache = new Dictionary<string, object> ();
++
++ public override object Add (string key, object entry, DateTime utcExpiry)
++ {
++ object value;
++
++ if (cache.TryGetValue (key, out value))
++ return value;
++
++ cache.Add (key, entry);
++ return entry;
++ }
++
++ public override object Get (string key)
++ {
++ object ret;
++
++ if (cache.TryGetValue (key, out ret))
++ return ret;
++
++ return null;
++ }
++
++ public override void Remove (string key)
++ {
++ if (cache.ContainsKey (key))
++ cache.Remove (key);
++ }
++
++ public override void Set (string key, object entry, DateTime utcExpiry)
++ {
++ if (cache.ContainsKey (key))
++ cache[key] = entry;
++ else
++ cache.Add (key, entry);
++ }
++ }
++}
--- /dev/null
--- /dev/null
++<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
++
++<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
++
++<html xmlns="http://www.w3.org/1999/xhtml">
++<head runat="server">
++ <title>OutputCacheProvider Test 1</title>
++</head>
++<body>
++ <form id="form1" runat="server">
++ <div><%= AppDomain.CurrentDomain.GetData ("BEGIN_CODE_MARKER") %><pre runat="server" id="output"></pre><%= AppDomain.CurrentDomain.GetData ("END_CODE_MARKER") %></div>
++ </form>
++</body>
++</html>
--- /dev/null
--- /dev/null
++using System;
++using System.Text;
++using System.Web;
++using System.Web.Caching;
++using System.Web.UI;
++using System.Web.UI.WebControls;
++
++public partial class _Default : System.Web.UI.Page
++{
++ protected void Page_Load (object sender, EventArgs e)
++ {
++ var sb = new StringBuilder ();
++ string name = OutputCache.DefaultProviderName;
++
++ sb.AppendFormat ("Default provider name: {0}\n", name);
++ name = ApplicationInstance.GetOutputCacheProviderName (null);
++ sb.AppendFormat ("Null context: {0}\n", name);
++
++ name = ApplicationInstance.GetOutputCacheProviderName (Context);
++ sb.AppendFormat ("Default context: {0}\n", name);
++
++ output.InnerText = sb.ToString ();
++ }
++}
--- /dev/null
--- /dev/null
++<?xml version="1.0"?>
++
++<configuration>
++
++ <system.web>
++ <compilation debug="true" targetFramework="4.0" />
++ <caching>
++ <outputCache defaultProvider="TestInMemoryProvider">
++ <providers>
++ <add name="TestInMemoryProvider" type="Test.InMemoryProvider, App_Code"/>
++ </providers>
++ </outputCache>
++ </caching>
++ </system.web>
++ <system.webServer>
++ <modules runAllManagedModulesForAllRequests="true"/>
++ </system.webServer>
++
++</configuration>
--- /dev/null
--- /dev/null
++<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
++
++<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
++
++<html xmlns="http://www.w3.org/1999/xhtml">
++<head runat="server">
++ <title>OutputCacheProvider Test 1</title>
++</head>
++<body>
++ <form id="form1" runat="server">
++ <div><pre runat="server" id="output"></pre></div>
++ </form>
++</body>
++</html>
--- /dev/null
--- /dev/null
++using System;
++using System.Text;
++using System.Web;
++using System.Web.Caching;
++using System.Web.UI;
++using System.Web.UI.WebControls;
++
++public partial class _Default : System.Web.UI.Page
++{
++ protected void Page_Load (object sender, EventArgs e)
++ {
++ var sb = new StringBuilder ();
++ string name = OutputCache.DefaultProviderName;
++
++ sb.AppendFormat ("Default provider name: {0}\n", name);
++ name = ApplicationInstance.GetOutputCacheProviderName (null);
++ sb.AppendFormat ("Null context: {0}\n", name);
++
++ name = ApplicationInstance.GetOutputCacheProviderName (Context);
++ sb.AppendFormat ("Default context: {0}\n", name);
++
++ output.InnerText = sb.ToString ();
++ }
++}
--- /dev/null
--- /dev/null
++<?xml version="1.0"?>
++
++<configuration>
++
++ <system.web>
++ <compilation debug="true" targetFramework="4.0" />
++ <caching>
++ <outputCache defaultProvider="MissingInMemoryProvider">
++ <providers>
++ <add name="MissingInMemoryProvider" type="Test.InMemoryProvider"/>
++ </providers>
++ </outputCache>
++ </caching>
++ </system.web>
++ <system.webServer>
++ <modules runAllManagedModulesForAllRequests="true"/>
++ </system.webServer>
++
++</configuration>
--- /dev/null
--- /dev/null
++using System;
++using System.Collections.Generic;
++using System.Configuration;
++using System.Linq;
++using System.Web;
++using System.Web.Caching;
++
++namespace Test
++{
++ public class AnotherInMemoryProvider : InMemoryProvider
++ {
++
++ }
++}
--- /dev/null
--- /dev/null
++using System;
++using System.Collections.Generic;
++using System.Configuration;
++using System.Linq;
++using System.Web;
++using System.Web.Caching;
++
++namespace Test
++{
++ public class InMemoryProvider : OutputCacheProvider
++ {
++ Dictionary<string, object> cache = new Dictionary<string, object> ();
++
++ public override object Add (string key, object entry, DateTime utcExpiry)
++ {
++ object value;
++
++ if (cache.TryGetValue (key, out value))
++ return value;
++
++ cache.Add (key, entry);
++ return entry;
++ }
++
++ public override object Get (string key)
++ {
++ object ret;
++
++ if (cache.TryGetValue (key, out ret))
++ return ret;
++
++ return null;
++ }
++
++ public override void Remove (string key)
++ {
++ if (cache.ContainsKey (key))
++ cache.Remove (key);
++ }
++
++ public override void Set (string key, object entry, DateTime utcExpiry)
++ {
++ if (cache.ContainsKey (key))
++ cache[key] = entry;
++ else
++ cache.Add (key, entry);
++ }
++ }
++}
--- /dev/null
--- /dev/null
++<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
++
++<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
++
++<html xmlns="http://www.w3.org/1999/xhtml">
++<head runat="server">
++ <title>OutputCacheProvider Test 1</title>
++</head>
++<body>
++ <form id="form1" runat="server">
++ <div><%= AppDomain.CurrentDomain.GetData ("BEGIN_CODE_MARKER") %><pre runat="server" id="output"></pre><%= AppDomain.CurrentDomain.GetData ("END_CODE_MARKER") %></div>
++ </form>
++</body>
++</html>
--- /dev/null
--- /dev/null
++using System;
++using System.Text;
++using System.Web;
++using System.Web.Caching;
++using System.Web.UI;
++using System.Web.UI.WebControls;
++
++public partial class _Default : System.Web.UI.Page
++{
++ protected void Page_Load (object sender, EventArgs e)
++ {
++ var sb = new StringBuilder ();
++ string name = OutputCache.DefaultProviderName;
++ sb.AppendFormat ("Default provider name: {0}\n", name);
++
++ name = ApplicationInstance.GetOutputCacheProviderName (Context);
++ sb.AppendFormat ("Default context: {0}\n", name);
++
++ output.InnerText = sb.ToString ();
++ }
++}
--- /dev/null
--- /dev/null
++<%@ Application Language="C#" %>
++<script RunAt="server">
++ public override string GetOutputCacheProviderName (HttpContext context)
++ {
++ if (context == null)
++ throw new ArgumentNullException ("context");
++
++ HttpRequest req = context.Request;
++ if (req == null)
++ throw new InvalidOperationException ("No request found.");
++
++ switch (req.QueryString["ocp"]) {
++ case "InMemory":
++ return "TestInMemoryProvider";
++
++ case "AnotherInMemory":
++ return "TestAnotherInMemoryProvider";
++
++ case "invalid":
++ return "NoSuchProviderFound";
++
++ default:
++ return base.GetOutputCacheProviderName (context);
++ }
++ }
++</script>
--- /dev/null
--- /dev/null
++<?xml version="1.0"?>
++
++<configuration>
++
++ <system.web>
++ <compilation debug="true" targetFramework="4.0" />
++ <caching>
++ <outputCache>
++ <providers>
++ <add name="TestInMemoryProvider" type="Test.InMemoryProvider, App_Code"/>
++ <add name="TestAnotherInMemoryProvider" type="Test.AnotherInMemoryProvider, App_Code"/>
++ </providers>
++ </outputCache>
++ </caching>
++ </system.web>
++ <system.webServer>
++ <modules runAllManagedModulesForAllRequests="true"/>
++ </system.webServer>
++
++</configuration>
--- /dev/null
--- /dev/null
++//
++// CacheItemComparer.cs
++//
++// Author:
++// Marek Habersack <grendel@twistedcode.net>
++//
++// Copyright (c) 2010, Marek Habersack
++//
++// All rights reserved.
++//
++// Redistribution and use in source and binary forms, with or without modification, are permitted
++// provided that the following conditions are met:
++//
++// * Redistributions of source code must retain the above copyright notice, this list of
++// conditions and the following disclaimer.
++// * Redistributions in binary form must reproduce the above copyright notice, this list of
++// conditions and the following disclaimer in the documentation and/or other materials
++// provided with the distribution.
++// * Neither the name of Marek Habersack nor the names of its contributors may be used to
++// endorse or promote products derived from this software without specific prior written
++// permission.
++//
++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
++// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
++// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
++// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
++// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
++// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
++// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
++// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
++// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++//
++using System;
++using System.Collections;
++using System.Web.Caching;
++
++namespace Tester
++{
++ class CacheItemComparer : IComparer
++ {
++ public int Compare (object o1, object o2)
++ {
++ CacheItem x = o1 as CacheItem;
++ CacheItem y = o2 as CacheItem;
++
++ if (x == null && y == null)
++ return 0;
++
++ if (x == null)
++ return 1;
++
++ if (y == null)
++ return -1;
++
++ if (x.ExpiresAt == y.ExpiresAt)
++ return 0;
++
++ return x.ExpiresAt < y.ExpiresAt ? -1 : 1;
++ }
++ }
++}
--- /dev/null
--- /dev/null
++using System;
++using System.Collections;
++
++namespace BenTools.Data
++{
++ public interface IPriorityQueue : ICollection, ICloneable, IList
++ {
++ int Push(object O);
++ object Pop();
++ object Peek();
++ void Update(int i);
++ }
++ public class BinaryPriorityQueue : IPriorityQueue, ICollection, ICloneable, IList
++ {
++ protected ArrayList InnerList = new ArrayList();
++ protected IComparer Comparer;
++
++ #region contructors
++ public BinaryPriorityQueue() : this(System.Collections.Comparer.Default)
++ {}
++ public BinaryPriorityQueue(IComparer c)
++ {
++ Comparer = c;
++ }
++ public BinaryPriorityQueue(int C) : this(System.Collections.Comparer.Default,C)
++ {}
++ public BinaryPriorityQueue(IComparer c, int Capacity)
++ {
++ Comparer = c;
++ InnerList.Capacity = Capacity;
++ }
++
++ protected BinaryPriorityQueue(ArrayList Core, IComparer Comp, bool Copy)
++ {
++ if(Copy)
++ InnerList = Core.Clone() as ArrayList;
++ else
++ InnerList = Core;
++ Comparer = Comp;
++ }
++
++ #endregion
++ protected void SwitchElements(int i, int j)
++ {
++ object h = InnerList[i];
++ InnerList[i] = InnerList[j];
++ InnerList[j] = h;
++ }
++
++ protected virtual int OnCompare(int i, int j)
++ {
++ return Comparer.Compare(InnerList[i],InnerList[j]);
++ }
++
++ #region public methods
++ /// <summary>
++ /// Push an object onto the PQ
++ /// </summary>
++ /// <param name="O">The new object</param>
++ /// <returns>The index in the list where the object is _now_. This will change when objects are taken from or put onto the PQ.</returns>
++ public int Push(object O)
++ {
++ int p = InnerList.Count,p2;
++ InnerList.Add(O); // E[p] = O
++ do
++ {
++ if(p==0)
++ break;
++ p2 = (p-1)/2;
++ if(OnCompare(p,p2)<0)
++ {
++ SwitchElements(p,p2);
++ p = p2;
++ }
++ else
++ break;
++ }while(true);
++ return p;
++ }
++
++ /// <summary>
++ /// Get the smallest object and remove it.
++ /// </summary>
++ /// <returns>The smallest object</returns>
++ public object Pop()
++ {
++ object result = InnerList[0];
++ int p = 0,p1,p2,pn;
++ InnerList[0] = InnerList[InnerList.Count-1];
++ InnerList.RemoveAt(InnerList.Count-1);
++ do
++ {
++ pn = p;
++ p1 = 2*p+1;
++ p2 = 2*p+2;
++ if(InnerList.Count>p1 && OnCompare(p,p1)>0) // links kleiner
++ p = p1;
++ if(InnerList.Count>p2 && OnCompare(p,p2)>0) // rechts noch kleiner
++ p = p2;
++
++ if(p==pn)
++ break;
++ SwitchElements(p,pn);
++ }while(true);
++ return result;
++ }
++
++ /// <summary>
++ /// Notify the PQ that the object at position i has changed
++ /// and the PQ needs to restore order.
++ /// Since you dont have access to any indexes (except by using the
++ /// explicit IList.this) you should not call this function without knowing exactly
++ /// what you do.
++ /// </summary>
++ /// <param name="i">The index of the changed object.</param>
++ public void Update(int i)
++ {
++ int p = i,pn;
++ int p1,p2;
++ do // aufsteigen
++ {
++ if(p==0)
++ break;
++ p2 = (p-1)/2;
++ if(OnCompare(p,p2)<0)
++ {
++ SwitchElements(p,p2);
++ p = p2;
++ }
++ else
++ break;
++ }while(true);
++ if(p<i)
++ return;
++ do // absteigen
++ {
++ pn = p;
++ p1 = 2*p+1;
++ p2 = 2*p+2;
++ if(InnerList.Count>p1 && OnCompare(p,p1)>0) // links kleiner
++ p = p1;
++ if(InnerList.Count>p2 && OnCompare(p,p2)>0) // rechts noch kleiner
++ p = p2;
++
++ if(p==pn)
++ break;
++ SwitchElements(p,pn);
++ }while(true);
++ }
++
++ /// <summary>
++ /// Get the smallest object without removing it.
++ /// </summary>
++ /// <returns>The smallest object</returns>
++ public object Peek()
++ {
++ if(InnerList.Count>0)
++ return InnerList[0];
++ return null;
++ }
++
++ public bool Contains(object value)
++ {
++ return InnerList.Contains(value);
++ }
++
++ public void Clear()
++ {
++ InnerList.Clear();
++ }
++
++ public int Count
++ {
++ get
++ {
++ return InnerList.Count;
++ }
++ }
++ IEnumerator IEnumerable.GetEnumerator()
++ {
++ return InnerList.GetEnumerator();
++ }
++
++ public void CopyTo(Array array, int index)
++ {
++ InnerList.CopyTo(array,index);
++ }
++
++ public object Clone()
++ {
++ return new BinaryPriorityQueue(InnerList,Comparer,true);
++ }
++
++ public bool IsSynchronized
++ {
++ get
++ {
++ return InnerList.IsSynchronized;
++ }
++ }
++
++ public object SyncRoot
++ {
++ get
++ {
++ return this;
++ }
++ }
++ #endregion
++ #region explicit implementation
++ bool IList.IsReadOnly
++ {
++ get
++ {
++ return false;
++ }
++ }
++
++ object IList.this[int index]
++ {
++ get
++ {
++ return InnerList[index];
++ }
++ set
++ {
++ InnerList[index] = value;
++ Update(index);
++ }
++ }
++
++ int IList.Add(object o)
++ {
++ return Push(o);
++ }
++
++ void IList.RemoveAt(int index)
++ {
++ throw new NotSupportedException();
++ }
++
++ void IList.Insert(int index, object value)
++ {
++ throw new NotSupportedException();
++ }
++
++ void IList.Remove(object value)
++ {
++ throw new NotSupportedException();
++ }
++
++ int IList.IndexOf(object value)
++ {
++ throw new NotSupportedException();
++ }
++
++ bool IList.IsFixedSize
++ {
++ get
++ {
++ return false;
++ }
++ }
++
++ public static BinaryPriorityQueue Syncronized(BinaryPriorityQueue P)
++ {
++ return new BinaryPriorityQueue(ArrayList.Synchronized(P.InnerList),P.Comparer,false);
++ }
++ public static BinaryPriorityQueue ReadOnly(BinaryPriorityQueue P)
++ {
++ return new BinaryPriorityQueue(ArrayList.ReadOnly(P.InnerList),P.Comparer,false);
++ }
++ #endregion
++ }
++}
--- /dev/null
--- /dev/null
++//
++// PriorityQueueState.cs
++//
++// Author:
++// Marek Habersack <grendel@twistedcode.net>
++//
++// Copyright (c) 2010, Marek Habersack
++//
++// All rights reserved.
++//
++// Redistribution and use in source and binary forms, with or without modification, are permitted
++// provided that the following conditions are met:
++//
++// * Redistributions of source code must retain the above copyright notice, this list of
++// conditions and the following disclaimer.
++// * Redistributions in binary form must reproduce the above copyright notice, this list of
++// conditions and the following disclaimer in the documentation and/or other materials
++// provided with the distribution.
++// * Neither the name of Marek Habersack nor the names of its contributors may be used to
++// endorse or promote products derived from this software without specific prior written
++// permission.
++//
++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
++// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
++// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
++// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
++// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
++// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
++// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
++// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
++// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++//
++using System;
++using System.Collections.Generic;
++using System.Web.Caching;
++
++using BenTools.Data;
++
++namespace Tester
++{
++ class PriorityQueueState
++ {
++ public readonly BinaryPriorityQueue Queue;
++ public readonly string ListName;
++ public readonly string QueueName;
++ public readonly string ItemName;
++
++ public int EnqueueCount;
++ public int DequeueCount;
++ public int DisableCount;
++ public int PeekCount;
++
++ public PriorityQueueState (string listName, string queueName, string itemName)
++ {
++ Queue = new BinaryPriorityQueue (new CacheItemComparer ());
++ EnqueueCount = 0;
++ DequeueCount = 0;
++ DisableCount = 0;
++ PeekCount = 0;
++ ListName = listName;
++ QueueName = queueName;
++ ItemName = itemName;
++ }
++
++ public void Enqueue (CacheItem item)
++ {
++ Queue.Push (item);
++ }
++
++ public CacheItem Dequeue ()
++ {
++ return Queue.Pop () as CacheItem;
++ }
++
++ public CacheItem Peek ()
++ {
++ return Queue.Peek () as CacheItem;
++ }
++ }
++}
--- /dev/null
--- /dev/null
++//
++// Sequences.cs
++//
++// Author:
++// Marek Habersack <grendel@twistedcode.net>
++//
++// Copyright (c) 2010, Marek Habersack
++//
++// All rights reserved.
++//
++// Redistribution and use in source and binary forms, with or without modification, are permitted
++// provided that the following conditions are met:
++//
++// * Redistributions of source code must retain the above copyright notice, this list of
++// conditions and the following disclaimer.
++// * Redistributions in binary form must reproduce the above copyright notice, this list of
++// conditions and the following disclaimer in the documentation and/or other materials
++// provided with the distribution.
++// * Neither the name of Marek Habersack nor the names of its contributors may be used to
++// endorse or promote products derived from this software without specific prior written
++// permission.
++//
++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
++// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
++// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
++// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
++// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
++// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
++// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
++// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
++// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++//
++using System;
++using System.Collections.Generic;
++using System.IO;
++using System.Text;
++using System.Web.Caching;
++using System.Xml;
++using System.Xml.XPath;
++
++namespace Tester
++{
++ static partial class Sequences
++ {
++ public static void Run (StringBuilder sb, string seqDir, string indent)
++ {
++ string[] files = Directory.GetFiles (seqDir, "*.seq");
++ if (files == null || files.Length == 0)
++ return;
++
++ int seqNum = 0;
++ Array.Sort <string> (files);
++ foreach (string f in files)
++ RunSequence (sb, indent, f, seqNum++);
++ }
++
++ static void RunSequence (StringBuilder sb, string initialIndent, string file, int seqNum)
++ {
++ Dictionary <Guid, int> cacheIndex;
++ List <CacheItem> cacheItems;
++ List <EDSequenceEntry> edSequence;
++
++ LoadEDSequence (file, out cacheIndex, out cacheItems, out edSequence);
++
++ if (edSequence == null || edSequence.Count == 0)
++ return;
++
++ string indent = initialIndent + "\t";
++ sb.SequenceMethodStart (initialIndent, file, seqNum);
++ sb.FormatList (indent, "list", cacheItems);
++ sb.Append (indent + "var queue = new CacheItemPriorityQueue ();\n");
++ sb.Append (indent + "CacheItem item;\n\n");
++
++ int idx;
++ var pq = new PriorityQueueState ("list", "queue", "item");
++ foreach (EDSequenceEntry entry in edSequence) {
++ idx = cacheIndex [entry.Item.Guid];
++
++ switch (entry.Type) {
++ case EDSequenceEntryType.Enqueue:
++ sb.FormatEnqueue (indent, pq, cacheItems, idx);
++ break;
++
++ case EDSequenceEntryType.Dequeue:
++ sb.FormatDequeue (indent, pq);
++ break;
++
++ case EDSequenceEntryType.Disable:
++ sb.FormatDisableItem (indent, pq, cacheItems, idx);
++ break;
++
++ case EDSequenceEntryType.Peek:
++ sb.FormatPeek (indent, pq);
++ break;
++ }
++ }
++
++ sb.FormatQueueSize (indent, pq);
++
++ while (pq.Queue.Count > 0)
++ sb.FormatDequeue (indent, pq);
++
++ sb.SequenceMethodEnd (initialIndent);
++ }
++
++ static List <EDSequenceEntry> LoadEDSequence (string file, out Dictionary <Guid, int> cacheIndex, out List <CacheItem> cacheItems,
++ out List <EDSequenceEntry> edSequence)
++ {
++ var doc = new XPathDocument (file);
++ XPathNavigator nav = doc.CreateNavigator (), current;
++ XPathNodeIterator nodes = nav.Select ("/sequence/entry");
++ CacheItem item;
++
++ edSequence = new List <EDSequenceEntry> ();
++ cacheIndex = new Dictionary <Guid, int> ();
++ cacheItems = new List <CacheItem> ();
++
++ while (nodes.MoveNext ()) {
++ current = nodes.Current;
++ item = CreateCacheItem (current, cacheIndex, cacheItems);
++ edSequence.Add (new EDSequenceEntry (item, current.GetRequiredAttribute <EDSequenceEntryType> ("type")));
++ }
++
++ return null;
++ }
++
++ static CacheItem CreateCacheItem (XPathNavigator node, Dictionary <Guid, int> cacheIndex, List <CacheItem> cacheItems)
++ {
++ Guid guid = node.GetRequiredAttribute <Guid> ("guid");
++ int idx;
++
++ if (cacheIndex.TryGetValue (guid, out idx))
++ return cacheItems [idx];
++
++ var ret = new CacheItem ();
++
++ ret.Key = node.GetRequiredAttribute <string> ("key");
++ ret.AbsoluteExpiration = node.GetRequiredAttribute <DateTime> ("absoluteExpiration");
++ ret.SlidingExpiration = node.GetRequiredAttribute <TimeSpan> ("slidingExpiration");
++ ret.Priority = node.GetRequiredAttribute <CacheItemPriority> ("priority");
++ ret.LastChange = node.GetRequiredAttribute <DateTime> ("lastChange");
++ ret.ExpiresAt = node.GetRequiredAttribute <long> ("expiresAt");
++ ret.Disabled = node.GetRequiredAttribute <bool> ("disabled");
++ ret.Guid = guid;
++
++ cacheItems.Add (ret);
++ cacheIndex.Add (guid, cacheItems.Count - 1);
++
++ return ret;
++ }
++ }
++}
--- /dev/null
--- /dev/null
++<?xml version="1.0" encoding="utf-8" standalone="yes"?>
++<sequence>
++ <entry type="Enqueue" key="PartialCachingControl\nGUID: 0a543377-1bcc-4ec5-9096-616fa29ec3f5\n" absoluteExpiration="634003610181191660" slidingExpiration="0" priority="Normal" lastChange="634003610131192280" expiresAt="634003610181191660" disabled="False" guid="b50f84e2-b96b-4183-ac6a-afeec88a258d" />
++ <entry type="Enqueue" key="@@@InProc@074DE5C88B2981727366B98C" absoluteExpiration="634003622131234770" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003610131234800" expiresAt="634003622131234770" disabled="False" guid="78f08aef-31b7-49e6-8ba9-2d7b09f5340e" />
++ <entry type="Disable" key="@@@InProc@074DE5C88B2981727366B98C" absoluteExpiration="634003622131234770" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003610131234800" expiresAt="634003622131234770" disabled="False" guid="78f08aef-31b7-49e6-8ba9-2d7b09f5340e" />
++ <entry type="Enqueue" key="@@@InProc@074DE5C88B2981727366B98C" absoluteExpiration="634003622131252350" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003610131252370" expiresAt="634003622131252350" disabled="False" guid="ecd90b49-bb12-4524-818e-977356f8b9d2" />
++ <entry type="Enqueue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003610216655680" slidingExpiration="0" priority="Normal" lastChange="634003610131299190" expiresAt="634003610216655680" disabled="False" guid="38e7f821-d638-4f1d-89bd-41db556eb37a" />
++ <entry type="Enqueue" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634003610216655680" slidingExpiration="0" priority="Normal" lastChange="634003610131300370" expiresAt="634003610216655680" disabled="False" guid="6e723bac-5e11-4cb3-933f-39923948371c" />
++ <entry type="Dequeue" key="PartialCachingControl\nGUID: 0a543377-1bcc-4ec5-9096-616fa29ec3f5\n" absoluteExpiration="634003610181191660" slidingExpiration="0" priority="Normal" lastChange="634003610131192280" expiresAt="634003610181191660" disabled="False" guid="b50f84e2-b96b-4183-ac6a-afeec88a258d" />
++ <entry type="Disable" key="PartialCachingControl\nGUID: 0a543377-1bcc-4ec5-9096-616fa29ec3f5\n" absoluteExpiration="634003610181191660" slidingExpiration="0" priority="Normal" lastChange="634003610131192280" expiresAt="634003610181191660" disabled="False" guid="b50f84e2-b96b-4183-ac6a-afeec88a258d" />
++ <entry type="Dequeue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003610216655680" slidingExpiration="0" priority="Normal" lastChange="634003610131299190" expiresAt="634003610216655680" disabled="False" guid="38e7f821-d638-4f1d-89bd-41db556eb37a" />
++ <entry type="Disable" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003610216655680" slidingExpiration="0" priority="Normal" lastChange="634003610131299190" expiresAt="634003610216655680" disabled="False" guid="38e7f821-d638-4f1d-89bd-41db556eb37a" />
++ <entry type="Dequeue" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634003610216655680" slidingExpiration="0" priority="Normal" lastChange="634003610131300370" expiresAt="634003610216655680" disabled="False" guid="6e723bac-5e11-4cb3-933f-39923948371c" />
++ <entry type="Disable" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634003610216655680" slidingExpiration="0" priority="Normal" lastChange="634003610131300370" expiresAt="634003610216655680" disabled="False" guid="6e723bac-5e11-4cb3-933f-39923948371c" />
++ <entry type="Enqueue" key="PartialCachingControl\nGUID: 0a543377-1bcc-4ec5-9096-616fa29ec3f5\n" absoluteExpiration="634003610312287880" slidingExpiration="0" priority="Normal" lastChange="634003610262288150" expiresAt="634003610312287880" disabled="False" guid="93db96c7-eb5b-43b3-8524-e7d90cd159d7" />
++ <entry type="Disable" key="@@@InProc@074DE5C88B2981727366B98C" absoluteExpiration="634003622131252350" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003610131252370" expiresAt="634003622131252350" disabled="False" guid="ecd90b49-bb12-4524-818e-977356f8b9d2" />
++ <entry type="Enqueue" key="@@@InProc@074DE5C88B2981727366B98C" absoluteExpiration="634003622262288710" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003610262288720" expiresAt="634003622262288710" disabled="False" guid="fc310ed6-2027-4d16-9343-a3e4b3487bd0" />
++ <entry type="Disable" key="@@@InProc@074DE5C88B2981727366B98C" absoluteExpiration="634003622262288710" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003610262288720" expiresAt="634003622262288710" disabled="False" guid="fc310ed6-2027-4d16-9343-a3e4b3487bd0" />
++ <entry type="Enqueue" key="@@@InProc@074DE5C88B2981727366B98C" absoluteExpiration="634003622262288910" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003610262288920" expiresAt="634003622262288910" disabled="False" guid="de47322e-63c8-474f-8d2f-fb6a591075df" />
++ <entry type="Enqueue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003610362271610" slidingExpiration="0" priority="Normal" lastChange="634003610262290290" expiresAt="634003610362271610" disabled="False" guid="f003a7ba-af48-4551-a206-1184fc83e621" />
++ <entry type="Enqueue" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634003610362271610" slidingExpiration="0" priority="Normal" lastChange="634003610262290570" expiresAt="634003610362271610" disabled="False" guid="5777ab80-078b-4f9a-81fb-f7872aceba99" />
++ <entry type="Dequeue" key="PartialCachingControl\nGUID: 0a543377-1bcc-4ec5-9096-616fa29ec3f5\n" absoluteExpiration="634003610312287880" slidingExpiration="0" priority="Normal" lastChange="634003610262288150" expiresAt="634003610312287880" disabled="False" guid="93db96c7-eb5b-43b3-8524-e7d90cd159d7" />
++ <entry type="Disable" key="PartialCachingControl\nGUID: 0a543377-1bcc-4ec5-9096-616fa29ec3f5\n" absoluteExpiration="634003610312287880" slidingExpiration="0" priority="Normal" lastChange="634003610262288150" expiresAt="634003610312287880" disabled="False" guid="93db96c7-eb5b-43b3-8524-e7d90cd159d7" />
++ <entry type="Dequeue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003610362271610" slidingExpiration="0" priority="Normal" lastChange="634003610262290290" expiresAt="634003610362271610" disabled="False" guid="f003a7ba-af48-4551-a206-1184fc83e621" />
++ <entry type="Disable" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003610362271610" slidingExpiration="0" priority="Normal" lastChange="634003610262290290" expiresAt="634003610362271610" disabled="False" guid="f003a7ba-af48-4551-a206-1184fc83e621" />
++</sequence>
--- /dev/null
--- /dev/null
++<?xml version="1.0" encoding="utf-8" standalone="yes"?>
++<sequence>
++ <entry type="Enqueue" key="PartialCachingControl\nGUID: 0a543377-1bcc-4ec5-9096-616fa29ec3f5\n" absoluteExpiration="634003610181191660" slidingExpiration="0" priority="Normal" lastChange="634003610131192280" expiresAt="634003610181191660" disabled="False" guid="b50f84e2-b96b-4183-ac6a-afeec88a258d" />
++ <entry type="Enqueue" key="@@@InProc@074DE5C88B2981727366B98C" absoluteExpiration="634003622131234770" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003610131234800" expiresAt="634003622131234770" disabled="False" guid="78f08aef-31b7-49e6-8ba9-2d7b09f5340e" />
++ <entry type="Enqueue" key="@@@InProc@074DE5C88B2981727366B98C" absoluteExpiration="634003622131252350" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003610131252370" expiresAt="634003622131252350" disabled="False" guid="ecd90b49-bb12-4524-818e-977356f8b9d2" />
++ <entry type="Enqueue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003610216655680" slidingExpiration="0" priority="Normal" lastChange="634003610131299190" expiresAt="634003610216655680" disabled="False" guid="38e7f821-d638-4f1d-89bd-41db556eb37a" />
++ <entry type="Enqueue" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634003610216655680" slidingExpiration="0" priority="Normal" lastChange="634003610131300370" expiresAt="634003610216655680" disabled="False" guid="6e723bac-5e11-4cb3-933f-39923948371c" />
++ <entry type="Enqueue" key="PartialCachingControl\nGUID: 0a543377-1bcc-4ec5-9096-616fa29ec3f5\n" absoluteExpiration="634003610312287880" slidingExpiration="0" priority="Normal" lastChange="634003610262288150" expiresAt="634003610312287880" disabled="False" guid="93db96c7-eb5b-43b3-8524-e7d90cd159d7" />
++ <entry type="Enqueue" key="@@@InProc@074DE5C88B2981727366B98C" absoluteExpiration="634003622262288710" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003610262288720" expiresAt="634003622262288710" disabled="False" guid="fc310ed6-2027-4d16-9343-a3e4b3487bd0" />
++ <entry type="Enqueue" key="@@@InProc@074DE5C88B2981727366B98C" absoluteExpiration="634003622262288910" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003610262288920" expiresAt="634003622262288910" disabled="False" guid="de47322e-63c8-474f-8d2f-fb6a591075df" />
++ <entry type="Enqueue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003610362271610" slidingExpiration="0" priority="Normal" lastChange="634003610262290290" expiresAt="634003610362271610" disabled="False" guid="f003a7ba-af48-4551-a206-1184fc83e621" />
++ <entry type="Enqueue" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634003610362271610" slidingExpiration="0" priority="Normal" lastChange="634003610262290570" expiresAt="634003610362271610" disabled="False" guid="5777ab80-078b-4f9a-81fb-f7872aceba99" />
++</sequence>
--- /dev/null
--- /dev/null
++<?xml version="1.0" encoding="utf-8" standalone="yes"?>
++<sequence>
++ <entry type="Enqueue" key="PartialCachingControl\nGUID: 0a543377-1bcc-4ec5-9096-616fa29ec3f5\n" absoluteExpiration="634003610181191660" slidingExpiration="0" priority="Normal" lastChange="634003610131192280" expiresAt="634003610181191660" disabled="False" guid="b50f84e2-b96b-4183-ac6a-afeec88a258d" />
++ <entry type="Enqueue" key="@@@InProc@074DE5C88B2981727366B98C" absoluteExpiration="634003622131234770" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003610131234800" expiresAt="634003622131234770" disabled="False" guid="78f08aef-31b7-49e6-8ba9-2d7b09f5340e" />
++ <entry type="Enqueue" key="@@@InProc@074DE5C88B2981727366B98C" absoluteExpiration="634003622131252350" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003610131252370" expiresAt="634003622131252350" disabled="False" guid="ecd90b49-bb12-4524-818e-977356f8b9d2" />
++ <entry type="Enqueue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003610216655680" slidingExpiration="0" priority="Normal" lastChange="634003610131299190" expiresAt="634003610216655680" disabled="False" guid="38e7f821-d638-4f1d-89bd-41db556eb37a" />
++ <entry type="Enqueue" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634003610216655680" slidingExpiration="0" priority="Normal" lastChange="634003610131300370" expiresAt="634003610216655680" disabled="False" guid="6e723bac-5e11-4cb3-933f-39923948371c" />
++ <entry type="Dequeue" key="PartialCachingControl\nGUID: 0a543377-1bcc-4ec5-9096-616fa29ec3f5\n" absoluteExpiration="634003610181191660" slidingExpiration="0" priority="Normal" lastChange="634003610131192280" expiresAt="634003610181191660" disabled="False" guid="b50f84e2-b96b-4183-ac6a-afeec88a258d" />
++ <entry type="Dequeue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003610216655680" slidingExpiration="0" priority="Normal" lastChange="634003610131299190" expiresAt="634003610216655680" disabled="False" guid="38e7f821-d638-4f1d-89bd-41db556eb37a" />
++ <entry type="Dequeue" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634003610216655680" slidingExpiration="0" priority="Normal" lastChange="634003610131300370" expiresAt="634003610216655680" disabled="False" guid="6e723bac-5e11-4cb3-933f-39923948371c" />
++ <entry type="Enqueue" key="PartialCachingControl\nGUID: 0a543377-1bcc-4ec5-9096-616fa29ec3f5\n" absoluteExpiration="634003610312287880" slidingExpiration="0" priority="Normal" lastChange="634003610262288150" expiresAt="634003610312287880" disabled="False" guid="93db96c7-eb5b-43b3-8524-e7d90cd159d7" />
++ <entry type="Enqueue" key="@@@InProc@074DE5C88B2981727366B98C" absoluteExpiration="634003622262288710" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003610262288720" expiresAt="634003622262288710" disabled="False" guid="fc310ed6-2027-4d16-9343-a3e4b3487bd0" />
++ <entry type="Enqueue" key="@@@InProc@074DE5C88B2981727366B98C" absoluteExpiration="634003622262288910" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003610262288920" expiresAt="634003622262288910" disabled="False" guid="de47322e-63c8-474f-8d2f-fb6a591075df" />
++ <entry type="Enqueue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003610362271610" slidingExpiration="0" priority="Normal" lastChange="634003610262290290" expiresAt="634003610362271610" disabled="False" guid="f003a7ba-af48-4551-a206-1184fc83e621" />
++ <entry type="Enqueue" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634003610362271610" slidingExpiration="0" priority="Normal" lastChange="634003610262290570" expiresAt="634003610362271610" disabled="False" guid="5777ab80-078b-4f9a-81fb-f7872aceba99" />
++ <entry type="Dequeue" key="PartialCachingControl\nGUID: 0a543377-1bcc-4ec5-9096-616fa29ec3f5\n" absoluteExpiration="634003610312287880" slidingExpiration="0" priority="Normal" lastChange="634003610262288150" expiresAt="634003610312287880" disabled="False" guid="93db96c7-eb5b-43b3-8524-e7d90cd159d7" />
++ <entry type="Dequeue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003610362271610" slidingExpiration="0" priority="Normal" lastChange="634003610262290290" expiresAt="634003610362271610" disabled="False" guid="f003a7ba-af48-4551-a206-1184fc83e621" />
++</sequence>
--- /dev/null
--- /dev/null
++<?xml version="1.0" encoding="utf-8" standalone="yes"?>
++<sequence>
++ <entry type="Enqueue" key="PartialCachingControl\nGUID: 19e19704-457b-4894-978c-63d6d022bf22\n" absoluteExpiration="634003686315246510" slidingExpiration="0" priority="Normal" lastChange="634003686265247140" expiresAt="634003686315246510" disabled="False" guid="3378afe8-5a2a-4f30-aedd-fa146880f93e" />
++ <entry type="Enqueue" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698265290760" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686265290790" expiresAt="634003698265290760" disabled="False" guid="33191cc7-c1b4-4726-b428-64efb69a6c46" />
++ <entry type="Disable" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698265290760" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686265290790" expiresAt="634003698265290760" disabled="False" guid="33191cc7-c1b4-4726-b428-64efb69a6c46" />
++ <entry type="Enqueue" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698265308270" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686265308280" expiresAt="634003698265308270" disabled="False" guid="88bee6f1-09ac-4af2-9bc3-ebd619009377" />
++ <entry type="Enqueue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003686350855860" slidingExpiration="0" priority="Normal" lastChange="634003686265355160" expiresAt="634003686350855860" disabled="False" guid="e290608d-7086-41a6-a87a-3f3051c14780" />
++ <entry type="Enqueue" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634003686350855860" slidingExpiration="0" priority="Normal" lastChange="634003686265356080" expiresAt="634003686350855860" disabled="False" guid="f374c3d0-06a5-4b0d-8fb5-f0e94a876847" />
++ <entry type="Disable" key="PartialCachingControl\nGUID: 19e19704-457b-4894-978c-63d6d022bf22\n" absoluteExpiration="634003686315246510" slidingExpiration="0" priority="Normal" lastChange="634003686265247140" expiresAt="634003686315246510" disabled="False" guid="3378afe8-5a2a-4f30-aedd-fa146880f93e" />
++ <entry type="Enqueue" key="PartialCachingControl\nGUID: 19e19704-457b-4894-978c-63d6d022bf22\n" absoluteExpiration="634003686370745960" slidingExpiration="0" priority="Normal" lastChange="634003686320746390" expiresAt="634003686370745960" disabled="False" guid="94cc61f5-312e-4d03-8d56-4e8b400f8ca0" />
++ <entry type="Disable" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698265308270" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686265308280" expiresAt="634003698265308270" disabled="False" guid="88bee6f1-09ac-4af2-9bc3-ebd619009377" />
++ <entry type="Enqueue" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698320747270" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686320747290" expiresAt="634003698320747270" disabled="False" guid="986174eb-da85-4a7b-9919-cd0668db69bf" />
++ <entry type="Disable" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698320747270" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686320747290" expiresAt="634003698320747270" disabled="False" guid="986174eb-da85-4a7b-9919-cd0668db69bf" />
++ <entry type="Enqueue" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698320747680" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686320747700" expiresAt="634003698320747680" disabled="False" guid="3c5fd8ab-a611-4bfb-afb0-5acee9b45dda" />
++ <entry type="Enqueue" key="@InMemoryOCP_vbk/default.aspxGETWQNgVadmin_edituserNuV78FH" absoluteExpiration="634003686420678320" slidingExpiration="0" priority="Normal" lastChange="634003686320750150" expiresAt="634003686420678320" disabled="False" guid="2d354d5c-8996-4932-ba5f-cd3591fe95cb" />
++ <entry type="Enqueue" key="@prefix@_vbk/default.aspxGETWQNgVadmin_edituserNuV78FH" absoluteExpiration="634003686420678320" slidingExpiration="0" priority="Normal" lastChange="634003686320750900" expiresAt="634003686420678320" disabled="False" guid="93a0e663-0354-4301-ac27-9e782091f661" />
++ <entry type="Disable" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003686350855860" slidingExpiration="0" priority="Normal" lastChange="634003686265355160" expiresAt="634003686350855860" disabled="False" guid="e290608d-7086-41a6-a87a-3f3051c14780" />
++ <entry type="Disable" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698320747680" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686320747700" expiresAt="634003698320747680" disabled="False" guid="3c5fd8ab-a611-4bfb-afb0-5acee9b45dda" />
++ <entry type="Enqueue" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698369030440" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686369030460" expiresAt="634003698369030440" disabled="False" guid="feebc79b-1867-42c9-a966-bbb448d78a44" />
++ <entry type="Disable" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698369030440" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686369030460" expiresAt="634003698369030440" disabled="False" guid="feebc79b-1867-42c9-a966-bbb448d78a44" />
++ <entry type="Enqueue" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698369035640" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686369035650" expiresAt="634003698369035640" disabled="False" guid="474193d1-4fd9-4b06-873a-e575744957a4" />
++ <entry type="Enqueue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003686469024010" slidingExpiration="0" priority="Normal" lastChange="634003686369037670" expiresAt="634003686469024010" disabled="False" guid="817d3f42-bf7b-4a13-90bc-1895cafe2d23" />
++ <entry type="Enqueue" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634003686469024010" slidingExpiration="0" priority="Normal" lastChange="634003686369038110" expiresAt="634003686469024010" disabled="False" guid="39402800-3c1e-478c-8bdc-571d902e32a7" />
++ <entry type="Disable" key="@InMemoryOCP_vbk/default.aspxGETWQNgVadmin_edituserNuV78FH" absoluteExpiration="634003686420678320" slidingExpiration="0" priority="Normal" lastChange="634003686320750150" expiresAt="634003686420678320" disabled="False" guid="2d354d5c-8996-4932-ba5f-cd3591fe95cb" />
++ <entry type="Disable" key="PartialCachingControl\nGUID: 19e19704-457b-4894-978c-63d6d022bf22\n" absoluteExpiration="634003686370745960" slidingExpiration="0" priority="Normal" lastChange="634003686320746390" expiresAt="634003686370745960" disabled="False" guid="94cc61f5-312e-4d03-8d56-4e8b400f8ca0" />
++ <entry type="Enqueue" key="PartialCachingControl\nGUID: 19e19704-457b-4894-978c-63d6d022bf22\n" absoluteExpiration="634003686509800050" slidingExpiration="0" priority="Normal" lastChange="634003686459800320" expiresAt="634003686509800050" disabled="False" guid="b45b3bd3-d55d-4c41-b9da-150c19ec0856" />
++ <entry type="Disable" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698369035640" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686369035650" expiresAt="634003698369035640" disabled="False" guid="474193d1-4fd9-4b06-873a-e575744957a4" />
++ <entry type="Enqueue" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698459800810" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686459800810" expiresAt="634003698459800810" disabled="False" guid="66bc962f-bf18-48a4-8164-722a5f53d211" />
++ <entry type="Disable" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698459800810" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686459800810" expiresAt="634003698459800810" disabled="False" guid="66bc962f-bf18-48a4-8164-722a5f53d211" />
++ <entry type="Enqueue" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698459801130" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686459801140" expiresAt="634003698459801130" disabled="False" guid="9096d210-ed15-4d38-9af2-26e59b0b8be0" />
++ <entry type="Enqueue" key="@InMemoryOCP_vbk/default.aspxGETWQNgVadmin_edituserNuV78FH" absoluteExpiration="634003686559793540" slidingExpiration="0" priority="Normal" lastChange="634003686459802570" expiresAt="634003686559793540" disabled="False" guid="f7e86ec2-dc06-484f-81ed-df4373fff95b" />
++ <entry type="Enqueue" key="@prefix@_vbk/default.aspxGETWQNgVadmin_edituserNuV78FH" absoluteExpiration="634003686559793540" slidingExpiration="0" priority="Normal" lastChange="634003686459802840" expiresAt="634003686559793540" disabled="False" guid="ad6319f5-27bc-4444-9eb8-1320009ab184" />
++ <entry type="Disable" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003686469024010" slidingExpiration="0" priority="Normal" lastChange="634003686369037670" expiresAt="634003686469024010" disabled="False" guid="817d3f42-bf7b-4a13-90bc-1895cafe2d23" />
++ <entry type="Disable" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698459801130" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686459801140" expiresAt="634003698459801130" disabled="False" guid="9096d210-ed15-4d38-9af2-26e59b0b8be0" />
++ <entry type="Enqueue" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698501880070" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686501880080" expiresAt="634003698501880070" disabled="False" guid="4e49dc65-2c6a-4b2f-97e2-9cf09175c57a" />
++ <entry type="Disable" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698501880070" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686501880080" expiresAt="634003698501880070" disabled="False" guid="4e49dc65-2c6a-4b2f-97e2-9cf09175c57a" />
++ <entry type="Enqueue" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698501880320" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686501880320" expiresAt="634003698501880320" disabled="False" guid="417fc6e2-b9ae-40eb-906b-6e41b306a908" />
++ <entry type="Enqueue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003686601873790" slidingExpiration="0" priority="Normal" lastChange="634003686501881840" expiresAt="634003686601873790" disabled="False" guid="7b0fb8c1-9642-4854-b979-7e223a092a3d" />
++ <entry type="Enqueue" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634003686601873790" slidingExpiration="0" priority="Normal" lastChange="634003686501882630" expiresAt="634003686601873790" disabled="False" guid="414bdd0b-ab30-4d61-aef2-2d34fd929ed2" />
++ <entry type="Disable" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003686601873790" slidingExpiration="0" priority="Normal" lastChange="634003686501881840" expiresAt="634003686601873790" disabled="False" guid="7b0fb8c1-9642-4854-b979-7e223a092a3d" />
++ <entry type="Disable" key="PartialCachingControl\nGUID: 19e19704-457b-4894-978c-63d6d022bf22\n" absoluteExpiration="634003686509800050" slidingExpiration="0" priority="Normal" lastChange="634003686459800320" expiresAt="634003686509800050" disabled="False" guid="b45b3bd3-d55d-4c41-b9da-150c19ec0856" />
++ <entry type="Enqueue" key="PartialCachingControl\nGUID: 19e19704-457b-4894-978c-63d6d022bf22\n" absoluteExpiration="634003686655460880" slidingExpiration="0" priority="Normal" lastChange="634003686605461330" expiresAt="634003686655460880" disabled="False" guid="c210ae2b-0c3d-4257-848d-f21ee48c02cc" />
++ <entry type="Disable" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698501880320" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686501880320" expiresAt="634003698501880320" disabled="False" guid="417fc6e2-b9ae-40eb-906b-6e41b306a908" />
++ <entry type="Enqueue" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698605462050" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686605462070" expiresAt="634003698605462050" disabled="False" guid="ac9cefe3-3331-4ee2-b0f1-69aaca2a955d" />
++ <entry type="Disable" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698605462050" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686605462070" expiresAt="634003698605462050" disabled="False" guid="ac9cefe3-3331-4ee2-b0f1-69aaca2a955d" />
++ <entry type="Enqueue" key="@@@InProc@A3D557581E229FAEA58A8D4F" absoluteExpiration="634003698605462460" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634003686605462470" expiresAt="634003698605462460" disabled="False" guid="ae852a56-e081-4ee7-b360-81d4ba1a2000" />
++ <entry type="Enqueue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003686705453300" slidingExpiration="0" priority="Normal" lastChange="634003686605464710" expiresAt="634003686705453300" disabled="False" guid="e8b43015-cc9b-4cad-a881-faead4f18aa3" />
++ <entry type="Enqueue" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634003686705453300" slidingExpiration="0" priority="Normal" lastChange="634003686605465030" expiresAt="634003686705453300" disabled="False" guid="3866994b-3be5-4408-9077-529fe701d3f3" />
++ <entry type="Dequeue" key="PartialCachingControl\nGUID: 19e19704-457b-4894-978c-63d6d022bf22\n" absoluteExpiration="634003686655460880" slidingExpiration="0" priority="Normal" lastChange="634003686605461330" expiresAt="634003686655460880" disabled="False" guid="c210ae2b-0c3d-4257-848d-f21ee48c02cc" />
++ <entry type="Disable" key="PartialCachingControl\nGUID: 19e19704-457b-4894-978c-63d6d022bf22\n" absoluteExpiration="634003686655460880" slidingExpiration="0" priority="Normal" lastChange="634003686605461330" expiresAt="634003686655460880" disabled="False" guid="c210ae2b-0c3d-4257-848d-f21ee48c02cc" />
++ <entry type="Dequeue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003686705453300" slidingExpiration="0" priority="Normal" lastChange="634003686605464710" expiresAt="634003686705453300" disabled="False" guid="e8b43015-cc9b-4cad-a881-faead4f18aa3" />
++ <entry type="Disable" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634003686705453300" slidingExpiration="0" priority="Normal" lastChange="634003686605464710" expiresAt="634003686705453300" disabled="False" guid="e8b43015-cc9b-4cad-a881-faead4f18aa3" />
++</sequence>
--- /dev/null
--- /dev/null
++<?xml version="1.0" encoding="utf-8" standalone="yes"?>
++<sequence>
++ <entry type="Enqueue" key="PartialCachingControl\nGUID: f11febcc-d445-4036-bb93-aa3932ceb4ef\n" absoluteExpiration="634007595994690560" slidingExpiration="0" priority="Normal" lastChange="634007595944691200" expiresAt="634007595994690560" disabled="False" guid="757dc15a-3340-4704-9292-17f3004e2ee5" />
++ <entry type="Enqueue" key="@@@InProc@B748F7C2AA1F04BCF40EAB40" absoluteExpiration="634007607944742000" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634007595944742030" expiresAt="634007607944742000" disabled="False" guid="a4778103-c8e9-4304-90db-3f54b718e50a" />
++ <entry type="Disable" key="@@@InProc@B748F7C2AA1F04BCF40EAB40" absoluteExpiration="634007607944742000" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634007595944742030" expiresAt="634007607944742000" disabled="False" guid="a4778103-c8e9-4304-90db-3f54b718e50a" />
++ <entry type="Enqueue" key="@@@InProc@B748F7C2AA1F04BCF40EAB40" absoluteExpiration="634007607944758990" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634007595944759010" expiresAt="634007607944758990" disabled="False" guid="246d4b59-6748-4bef-8f78-5b081b0686f1" />
++ <entry type="Enqueue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634007596029748620" slidingExpiration="0" priority="Normal" lastChange="634007595944806730" expiresAt="634007596029748620" disabled="False" guid="46616129-bd8d-402b-954f-a05944535e23" />
++ <entry type="Enqueue" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634007596029748620" slidingExpiration="0" priority="Normal" lastChange="634007595944808340" expiresAt="634007596029748620" disabled="False" guid="f85a0942-6f20-4f71-ae57-3b2669052460" />
++ <entry type="Peek" key="PartialCachingControl\nGUID: f11febcc-d445-4036-bb93-aa3932ceb4ef\n" absoluteExpiration="634007595994690560" slidingExpiration="0" priority="Normal" lastChange="634007595944691200" expiresAt="634007595994690560" disabled="False" guid="757dc15a-3340-4704-9292-17f3004e2ee5" />
++ <entry type="Dequeue" key="PartialCachingControl\nGUID: f11febcc-d445-4036-bb93-aa3932ceb4ef\n" absoluteExpiration="634007595994690560" slidingExpiration="0" priority="Normal" lastChange="634007595944691200" expiresAt="634007595994690560" disabled="False" guid="757dc15a-3340-4704-9292-17f3004e2ee5" />
++ <entry type="Disable" key="PartialCachingControl\nGUID: f11febcc-d445-4036-bb93-aa3932ceb4ef\n" absoluteExpiration="634007595994690560" slidingExpiration="0" priority="Normal" lastChange="634007595944691200" expiresAt="634007595994690560" disabled="False" guid="757dc15a-3340-4704-9292-17f3004e2ee5" />
++ <entry type="Peek" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634007596029748620" slidingExpiration="0" priority="Normal" lastChange="634007595944808340" expiresAt="634007596029748620" disabled="False" guid="f85a0942-6f20-4f71-ae57-3b2669052460" />
++ <entry type="Dequeue" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634007596029748620" slidingExpiration="0" priority="Normal" lastChange="634007595944808340" expiresAt="634007596029748620" disabled="False" guid="f85a0942-6f20-4f71-ae57-3b2669052460" />
++ <entry type="Disable" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634007596029748620" slidingExpiration="0" priority="Normal" lastChange="634007595944808340" expiresAt="634007596029748620" disabled="False" guid="f85a0942-6f20-4f71-ae57-3b2669052460" />
++ <entry type="Peek" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634007596029748620" slidingExpiration="0" priority="Normal" lastChange="634007595944806730" expiresAt="634007596029748620" disabled="False" guid="46616129-bd8d-402b-954f-a05944535e23" />
++ <entry type="Dequeue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634007596029748620" slidingExpiration="0" priority="Normal" lastChange="634007595944806730" expiresAt="634007596029748620" disabled="False" guid="46616129-bd8d-402b-954f-a05944535e23" />
++ <entry type="Disable" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634007596029748620" slidingExpiration="0" priority="Normal" lastChange="634007595944806730" expiresAt="634007596029748620" disabled="False" guid="46616129-bd8d-402b-954f-a05944535e23" />
++ <entry type="Peek" key="@@@InProc@B748F7C2AA1F04BCF40EAB40" absoluteExpiration="634007607944742000" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634007595944742030" expiresAt="634007607944742000" disabled="False" guid="a4778103-c8e9-4304-90db-3f54b718e50a" />
++ <entry type="Dequeue" key="@@@InProc@B748F7C2AA1F04BCF40EAB40" absoluteExpiration="634007607944742000" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634007595944742030" expiresAt="634007607944742000" disabled="False" guid="a4778103-c8e9-4304-90db-3f54b718e50a" />
++ <entry type="Dequeue" key="@@@InProc@B748F7C2AA1F04BCF40EAB40" absoluteExpiration="634007607944758990" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634007595944759010" expiresAt="634007607944758990" disabled="False" guid="246d4b59-6748-4bef-8f78-5b081b0686f1" />
++ <entry type="Enqueue" key="PartialCachingControl\nGUID: f11febcc-d445-4036-bb93-aa3932ceb4ef\n" absoluteExpiration="634007596187154840" slidingExpiration="0" priority="Normal" lastChange="634007596137155110" expiresAt="634007596187154840" disabled="False" guid="e8b1f7d4-a874-4b56-84ce-1434a72f9d35" />
++ <entry type="Disable" key="@@@InProc@B748F7C2AA1F04BCF40EAB40" absoluteExpiration="634007607944758990" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634007595944759010" expiresAt="634007607944758990" disabled="False" guid="246d4b59-6748-4bef-8f78-5b081b0686f1" />
++ <entry type="Enqueue" key="@@@InProc@B748F7C2AA1F04BCF40EAB40" absoluteExpiration="634007608137155850" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634007596137155860" expiresAt="634007608137155850" disabled="False" guid="bc16a289-5ce4-436f-9791-1885f033bc6e" />
++ <entry type="Disable" key="@@@InProc@B748F7C2AA1F04BCF40EAB40" absoluteExpiration="634007608137155850" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634007596137155860" expiresAt="634007608137155850" disabled="False" guid="bc16a289-5ce4-436f-9791-1885f033bc6e" />
++ <entry type="Enqueue" key="@@@InProc@B748F7C2AA1F04BCF40EAB40" absoluteExpiration="634007608137156090" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634007596137156090" expiresAt="634007608137156090" disabled="False" guid="f6651f9b-36fd-481d-bb31-8abc3d110a45" />
++ <entry type="Enqueue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634007596237139120" slidingExpiration="0" priority="Normal" lastChange="634007596137157830" expiresAt="634007596237139120" disabled="False" guid="226ef04f-1118-4225-abe1-43d6e228db95" />
++ <entry type="Enqueue" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634007596237139120" slidingExpiration="0" priority="Normal" lastChange="634007596137158220" expiresAt="634007596237139120" disabled="False" guid="9df2ed49-168b-4769-8d9e-7f963e62123c" />
++ <entry type="Peek" key="PartialCachingControl\nGUID: f11febcc-d445-4036-bb93-aa3932ceb4ef\n" absoluteExpiration="634007596187154840" slidingExpiration="0" priority="Normal" lastChange="634007596137155110" expiresAt="634007596187154840" disabled="False" guid="e8b1f7d4-a874-4b56-84ce-1434a72f9d35" />
++ <entry type="Dequeue" key="PartialCachingControl\nGUID: f11febcc-d445-4036-bb93-aa3932ceb4ef\n" absoluteExpiration="634007596187154840" slidingExpiration="0" priority="Normal" lastChange="634007596137155110" expiresAt="634007596187154840" disabled="False" guid="e8b1f7d4-a874-4b56-84ce-1434a72f9d35" />
++ <entry type="Disable" key="PartialCachingControl\nGUID: f11febcc-d445-4036-bb93-aa3932ceb4ef\n" absoluteExpiration="634007596187154840" slidingExpiration="0" priority="Normal" lastChange="634007596137155110" expiresAt="634007596187154840" disabled="False" guid="e8b1f7d4-a874-4b56-84ce-1434a72f9d35" />
++ <entry type="Peek" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634007596237139120" slidingExpiration="0" priority="Normal" lastChange="634007596137158220" expiresAt="634007596237139120" disabled="False" guid="9df2ed49-168b-4769-8d9e-7f963e62123c" />
++ <entry type="Peek" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634007596237139120" slidingExpiration="0" priority="Normal" lastChange="634007596137158220" expiresAt="634007596237139120" disabled="False" guid="9df2ed49-168b-4769-8d9e-7f963e62123c" />
++ <entry type="Dequeue" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634007596237139120" slidingExpiration="0" priority="Normal" lastChange="634007596137158220" expiresAt="634007596237139120" disabled="False" guid="9df2ed49-168b-4769-8d9e-7f963e62123c" />
++ <entry type="Disable" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634007596237139120" slidingExpiration="0" priority="Normal" lastChange="634007596137158220" expiresAt="634007596237139120" disabled="False" guid="9df2ed49-168b-4769-8d9e-7f963e62123c" />
++ <entry type="Peek" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634007596237139120" slidingExpiration="0" priority="Normal" lastChange="634007596137157830" expiresAt="634007596237139120" disabled="False" guid="226ef04f-1118-4225-abe1-43d6e228db95" />
++ <entry type="Dequeue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634007596237139120" slidingExpiration="0" priority="Normal" lastChange="634007596137157830" expiresAt="634007596237139120" disabled="False" guid="226ef04f-1118-4225-abe1-43d6e228db95" />
++ <entry type="Disable" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634007596237139120" slidingExpiration="0" priority="Normal" lastChange="634007596137157830" expiresAt="634007596237139120" disabled="False" guid="226ef04f-1118-4225-abe1-43d6e228db95" />
++ <entry type="Peek" key="@@@InProc@B748F7C2AA1F04BCF40EAB40" absoluteExpiration="634007608137155850" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634007596137155860" expiresAt="634007608137155850" disabled="False" guid="bc16a289-5ce4-436f-9791-1885f033bc6e" />
++ <entry type="Dequeue" key="@@@InProc@B748F7C2AA1F04BCF40EAB40" absoluteExpiration="634007608137155850" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634007596137155860" expiresAt="634007608137155850" disabled="False" guid="bc16a289-5ce4-436f-9791-1885f033bc6e" />
++ <entry type="Dequeue" key="@@@InProc@B748F7C2AA1F04BCF40EAB40" absoluteExpiration="634007608137156090" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634007596137156090" expiresAt="634007608137156090" disabled="False" guid="f6651f9b-36fd-481d-bb31-8abc3d110a45" />
++ <entry type="Enqueue" key="PartialCachingControl\nGUID: f11febcc-d445-4036-bb93-aa3932ceb4ef\n" absoluteExpiration="634007596504393570" slidingExpiration="0" priority="Normal" lastChange="634007596454393850" expiresAt="634007596504393570" disabled="False" guid="30952e54-d94b-450d-b1ff-5e74c66bb4f5" />
++ <entry type="Disable" key="@@@InProc@B748F7C2AA1F04BCF40EAB40" absoluteExpiration="634007608137156090" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634007596137156090" expiresAt="634007608137156090" disabled="False" guid="f6651f9b-36fd-481d-bb31-8abc3d110a45" />
++ <entry type="Enqueue" key="@@@InProc@B748F7C2AA1F04BCF40EAB40" absoluteExpiration="634007608454399100" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634007596454399110" expiresAt="634007608454399100" disabled="False" guid="e50d5a73-7861-412b-b9ad-924c13c2e9c5" />
++ <entry type="Disable" key="@@@InProc@B748F7C2AA1F04BCF40EAB40" absoluteExpiration="634007608454399100" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634007596454399110" expiresAt="634007608454399100" disabled="False" guid="e50d5a73-7861-412b-b9ad-924c13c2e9c5" />
++ <entry type="Enqueue" key="@@@InProc@B748F7C2AA1F04BCF40EAB40" absoluteExpiration="634007608454399320" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634007596454399330" expiresAt="634007608454399320" disabled="False" guid="631452f5-a8e5-483e-a0ac-9c3f7abd37a1" />
++ <entry type="Enqueue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634007596554387900" slidingExpiration="0" priority="Normal" lastChange="634007596454400830" expiresAt="634007596554387900" disabled="False" guid="01a63c0e-5963-4eac-8b0e-b1b2ea508098" />
++ <entry type="Enqueue" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634007596554387900" slidingExpiration="0" priority="Normal" lastChange="634007596454401080" expiresAt="634007596554387900" disabled="False" guid="9e38cf23-6785-49e8-9922-8e1c1d86a205" />
++ <entry type="Peek" key="PartialCachingControl\nGUID: f11febcc-d445-4036-bb93-aa3932ceb4ef\n" absoluteExpiration="634007596504393570" slidingExpiration="0" priority="Normal" lastChange="634007596454393850" expiresAt="634007596504393570" disabled="False" guid="30952e54-d94b-450d-b1ff-5e74c66bb4f5" />
++ <entry type="Dequeue" key="PartialCachingControl\nGUID: f11febcc-d445-4036-bb93-aa3932ceb4ef\n" absoluteExpiration="634007596504393570" slidingExpiration="0" priority="Normal" lastChange="634007596454393850" expiresAt="634007596504393570" disabled="False" guid="30952e54-d94b-450d-b1ff-5e74c66bb4f5" />
++ <entry type="Disable" key="PartialCachingControl\nGUID: f11febcc-d445-4036-bb93-aa3932ceb4ef\n" absoluteExpiration="634007596504393570" slidingExpiration="0" priority="Normal" lastChange="634007596454393850" expiresAt="634007596504393570" disabled="False" guid="30952e54-d94b-450d-b1ff-5e74c66bb4f5" />
++ <entry type="Peek" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634007596554387900" slidingExpiration="0" priority="Normal" lastChange="634007596454401080" expiresAt="634007596554387900" disabled="False" guid="9e38cf23-6785-49e8-9922-8e1c1d86a205" />
++ <entry type="Peek" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634007596554387900" slidingExpiration="0" priority="Normal" lastChange="634007596454401080" expiresAt="634007596554387900" disabled="False" guid="9e38cf23-6785-49e8-9922-8e1c1d86a205" />
++ <entry type="Dequeue" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634007596554387900" slidingExpiration="0" priority="Normal" lastChange="634007596454401080" expiresAt="634007596554387900" disabled="False" guid="9e38cf23-6785-49e8-9922-8e1c1d86a205" />
++ <entry type="Disable" key="@prefix@_vbk/default.aspxGETWQFH" absoluteExpiration="634007596554387900" slidingExpiration="0" priority="Normal" lastChange="634007596454401080" expiresAt="634007596554387900" disabled="False" guid="9e38cf23-6785-49e8-9922-8e1c1d86a205" />
++ <entry type="Peek" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634007596554387900" slidingExpiration="0" priority="Normal" lastChange="634007596454400830" expiresAt="634007596554387900" disabled="False" guid="01a63c0e-5963-4eac-8b0e-b1b2ea508098" />
++ <entry type="Dequeue" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634007596554387900" slidingExpiration="0" priority="Normal" lastChange="634007596454400830" expiresAt="634007596554387900" disabled="False" guid="01a63c0e-5963-4eac-8b0e-b1b2ea508098" />
++ <entry type="Disable" key="@InMemoryOCP_vbk/default.aspxGETWQFH" absoluteExpiration="634007596554387900" slidingExpiration="0" priority="Normal" lastChange="634007596454400830" expiresAt="634007596554387900" disabled="False" guid="01a63c0e-5963-4eac-8b0e-b1b2ea508098" />
++ <entry type="Peek" key="@@@InProc@B748F7C2AA1F04BCF40EAB40" absoluteExpiration="634007608454399100" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634007596454399110" expiresAt="634007608454399100" disabled="False" guid="e50d5a73-7861-412b-b9ad-924c13c2e9c5" />
++ <entry type="Dequeue" key="@@@InProc@B748F7C2AA1F04BCF40EAB40" absoluteExpiration="634007608454399100" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634007596454399110" expiresAt="634007608454399100" disabled="False" guid="e50d5a73-7861-412b-b9ad-924c13c2e9c5" />
++ <entry type="Dequeue" key="@@@InProc@B748F7C2AA1F04BCF40EAB40" absoluteExpiration="634007608454399320" slidingExpiration="12000000000" priority="AboveNormal" lastChange="634007596454399330" expiresAt="634007608454399320" disabled="False" guid="631452f5-a8e5-483e-a0ac-9c3f7abd37a1" />
++</sequence>
--- /dev/null
--- /dev/null
++//
++// Utils.cs
++//
++// Author:
++// Marek Habersack <grendel@twistedcode.net>
++//
++// Copyright (c) 2010, Marek Habersack
++//
++// All rights reserved.
++//
++// Redistribution and use in source and binary forms, with or without modification, are permitted
++// provided that the following conditions are met:
++//
++// * Redistributions of source code must retain the above copyright notice, this list of
++// conditions and the following disclaimer.
++// * Redistributions in binary form must reproduce the above copyright notice, this list of
++// conditions and the following disclaimer in the documentation and/or other materials
++// provided with the distribution.
++// * Neither the name of Marek Habersack nor the names of its contributors may be used to
++// endorse or promote products derived from this software without specific prior written
++// permission.
++//
++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
++// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
++// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
++// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
++// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
++// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
++// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
++// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
++// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++//
++using System;
++using System.Collections.Generic;
++using System.ComponentModel;
++using System.IO;
++using System.Text;
++using System.Web.Caching;
++using System.Xml;
++using System.Xml.XPath;
++
++namespace Tester
++{
++ static class Utils
++ {
++ public static T GetRequiredAttribute <T> (this XPathNavigator nav, string name)
++ {
++ string value = nav.GetAttribute (name, String.Empty);
++ if (String.IsNullOrEmpty (value))
++ throw new InvalidOperationException (String.Format ("Required attribute '{0}' missing.", name));
++
++ if (typeof (T) == typeof (string))
++ return (T)((object)value);
++
++ // Special cases because we use ticks
++ if (typeof (T) == typeof (DateTime))
++ return (T)((object) new DateTime (Int64.Parse (value)));
++ else if (typeof (T) == typeof (TimeSpan))
++ return (T)((object) new TimeSpan (Int64.Parse (value)));
++
++ TypeConverter cvt = TypeDescriptor.GetConverter (typeof (T));
++ if (cvt == null)
++ throw new InvalidOperationException (String.Format ("Type converter for type '{0}' cannot be found.", typeof (T)));
++
++ if (!cvt.CanConvertFrom (typeof (string)))
++ throw new InvalidOperationException (String.Format ("Conversion from string to type '{0}' is not supported.", typeof (T)));
++
++ return (T) cvt.ConvertFrom (value);
++ }
++
++ public static void SequenceMethodStart (this StringBuilder sb, string indent, string fileName, int seqNum)
++ {
++ sb.Append ("\n" + indent);
++ sb.AppendFormat ("[Test (Description=\"Generated from sequence file {0}\")]\n", Path.GetFileName (fileName));
++ sb.Append (indent);
++ sb.AppendFormat ("public void Sequence_{0:0000} ()\n", seqNum);
++ sb.Append (indent);
++ sb.Append ("{\n");
++ }
++
++ public static void SequenceMethodEnd (this StringBuilder sb, string indent)
++ {
++ sb.Append (indent);
++ sb.Append ("}\n");
++ }
++
++ public static void FormatQueueSize (this StringBuilder sb, string indent, PriorityQueueState qs)
++ {
++ sb.Append (indent);
++ sb.AppendFormat ("Assert.AreEqual ({0}, {1}.Count, \"Queue size after sequence\");\n\n",
++ qs.Queue.Count, qs.QueueName);
++ }
++
++ public static void FormatDisableItem (this StringBuilder sb, string indent, PriorityQueueState qs, List <CacheItem> list, int index)
++ {
++ CacheItem item = list [index];
++ sb.Append (indent);
++ sb.AppendFormat ("{0} = {1} [{2}];\n", qs.ItemName, qs.ListName, index);
++ sb.Append (indent);
++
++ if (item == null) {
++ sb.AppendFormat ("Assert.IsNull ({0}, \"Disable-{1:0000}-1\");\n",
++ qs.ItemName, qs.DisableCount);
++ return;
++ }
++
++ sb.AppendFormat ("Assert.IsNotNull ({0}, \"Disable-{1:0000}-1\");\n",
++ qs.ItemName, qs.DisableCount);
++
++ sb.Append (indent);
++ sb.AppendFormat ("Assert.AreEqual (\"{0}\", {1}.Guid.ToString(), \"Disable-{2:0000}-3\");\n",
++ item.Guid.ToString (), qs.ItemName, qs.DisableCount);
++
++ sb.Append (indent);
++ sb.AppendFormat ("Assert.AreEqual ({0}, {1}.Disabled, \"Disable-{2:0000}-3\");\n",
++ item.Disabled.ToString ().ToLowerInvariant (),
++ qs.ItemName, qs.DisableCount);
++ sb.Append (indent);
++ sb.AppendFormat ("{0}.Disabled = true;\n\n", qs.ItemName);
++
++ item.Disabled = true;
++
++ qs.DisableCount++;
++ }
++
++ public static void FormatDequeue (this StringBuilder sb, string indent, PriorityQueueState qs)
++ {
++ CacheItem item = qs.Dequeue ();
++
++ sb.Append (indent);
++ sb.AppendFormat ("{0} = {1}.Dequeue ();\n", qs.ItemName, qs.QueueName);
++ sb.Append (indent);
++ if (item != null)
++ sb.AppendFormat ("Assert.IsNotNull ({0}, \"Dequeue-{1:0000}-1\");\n", qs.ItemName, qs.DequeueCount);
++ else
++ sb.AppendFormat ("Assert.IsNull ({0}, \"Dequeue-{1:0000}-1\");\n", qs.ItemName, qs.DequeueCount);
++
++ sb.Append (indent);
++ sb.AppendFormat ("Assert.AreEqual ({0}, {1}.Count, \"Dequeue-{2:0000}-2\");\n",
++ qs.Queue.Count, qs.QueueName, qs.DequeueCount);
++
++ if (item != null) {
++ sb.Append (indent);
++ sb.AppendFormat ("Assert.AreEqual (\"{0}\", {1}.Guid.ToString (), \"Dequeue-{2:0000}-3\");\n",
++ item.Guid.ToString (), qs.ItemName, qs.DequeueCount);
++ sb.Append (indent);
++ sb.AppendFormat ("Assert.AreEqual ({0}, {1}.Disabled, \"Dequeue-{2:0000}-4\");\n\n",
++ item.Disabled.ToString ().ToLowerInvariant (), qs.ItemName, qs.DequeueCount);
++ }
++
++ qs.DequeueCount++;
++ }
++
++ public static void FormatPeek (this StringBuilder sb, string indent, PriorityQueueState qs)
++ {
++ CacheItem item = qs.Peek ();
++
++ sb.Append (indent);
++ sb.AppendFormat ("{0} = {1}.Peek ();\n", qs.ItemName, qs.QueueName);
++ sb.Append (indent);
++ if (item != null)
++ sb.AppendFormat ("Assert.IsNotNull ({0}, \"Peek-{1:0000}-1\");\n", qs.ItemName, qs.PeekCount);
++ else
++ sb.AppendFormat ("Assert.IsNull ({0}, \"Peek-{1:0000}-1\");\n", qs.ItemName, qs.PeekCount);
++
++ sb.Append (indent);
++ sb.AppendFormat ("Assert.AreEqual ({0}, {1}.Count, \"Peek-{2:0000}-2\");\n", qs.Queue.Count, qs.QueueName, qs.PeekCount);
++
++ if (item != null) {
++ sb.Append (indent);
++ sb.AppendFormat ("Assert.AreEqual (\"{0}\", {1}.Guid.ToString (), \"Peek-{2:0000}-3\");\n",
++ item.Guid.ToString (), qs.ItemName, qs.PeekCount);
++ sb.Append (indent);
++ sb.AppendFormat ("Assert.AreEqual ({0}, {1}.Disabled, \"Peek-{2:0000}-4\");\n\n",
++ item.Disabled.ToString ().ToLowerInvariant (), qs.ItemName, qs.PeekCount);
++ }
++
++ 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);
++ sb.AppendFormat ("{0}.Enqueue ({1} [{2}]);\n", qs.QueueName, qs.ListName, index);
++ sb.Append (indent);
++ sb.AppendFormat ("Assert.AreEqual ({0}, {1}.Count, \"Enqueue-{2:0000}-1\");\n",
++ qs.Queue.Count, qs.QueueName, qs.EnqueueCount);
++ sb.Append (indent);
++ sb.AppendFormat ("Assert.AreEqual (\"{0}\", {1}.Peek ().Guid.ToString(), \"Enqueue-{2:0000}-2\");\n\n",
++ qs.Peek ().Guid.ToString (), qs.QueueName, qs.EnqueueCount);
++
++ qs.EnqueueCount++;
++ }
++
++ public static void FormatList (this StringBuilder sb, string indent, string listName, List <CacheItem> list)
++ {
++ if (list == null || list.Count == 0) {
++ sb.AppendFormat (indent + "var {0} = new List <CacheItem> ();\n", listName);
++ return;
++ }
++
++ sb.AppendFormat (indent + "var {0} = new List <CacheItem> {{\n", listName);
++
++ foreach (CacheItem ci in list)
++ CreateNewCacheItemInstanceCode (indent + "\t", sb, ci);
++ sb.Append (indent + "};\n");
++ }
++
++ static void CreateNewCacheItemInstanceCode (string indent, StringBuilder sb, CacheItem item)
++ {
++ sb.Append (indent + "new CacheItem {");
++ sb.AppendFormat ("Key = \"{0}\", ", item.Key.Replace ("\n", "\\n").Replace ("\r", "\\r"));
++ sb.AppendFormat ("AbsoluteExpiration = DateTime.Parse (\"{0}\"), ", item.AbsoluteExpiration.ToString ());
++ sb.AppendFormat ("SlidingExpiration = TimeSpan.Parse (\"{0}\"), ", item.SlidingExpiration.ToString ());
++ sb.AppendFormat ("Priority = CacheItemPriority.{0}, ", item.Priority);
++ sb.AppendFormat ("LastChange = DateTime.Parse (\"{0}\"), ", item.LastChange.ToString ());
++ sb.AppendFormat ("ExpiresAt = {0}, ", item.ExpiresAt);
++ sb.AppendFormat ("Disabled = {0}, ", item.Disabled.ToString ().ToLowerInvariant ());
++ sb.AppendFormat ("Guid = new Guid (\"{0}\")}}, \n", item.Guid.ToString ());
++ }
++ }
++}
--- /dev/null
--- /dev/null
++using System;
++using System.Collections.Generic;
++using System.IO;
++using System.Reflection;
++using System.Text;
++using System.Web;
++using System.Web.Caching;
++
++namespace Tester
++{
++ class Tester
++ {
++ static void Main (string[] args)
++ {
++ if (args.Length < 1) {
++ Console.WriteLine ("Usage: cache-pq-test-generator.exe <SEQUENCE_DIRECTORY>");
++ Console.WriteLine ();
++ Environment.Exit (1);
++ }
++
++ if (!Directory.Exists (args [0])) {
++ Console.WriteLine ("Sequence directory {0} cannot be found.", args [0]);
++ Environment.Exit (1);
++ }
++
++ var sb = new StringBuilder ();
++ sb.Append (@"//
++// This source was autogenerated - do not modify it, changes may not be preserved
++//
++#if !TARGET_DOTNET
++using System;
++using System.Collections.Generic;
++using System.Web;
++using System.Web.Caching;
++
++using NUnit.Framework;
++
++namespace MonoTests.System.Web.Caching
++{
++ public partial class CacheItemPriorityQueueTest
++ {");
++ Sequences.Run (sb, args [0], "\t\t");
++ sb.Append (" }\n}\n#endif\n");
++
++ Console.WriteLine (sb.ToString ());
++ }
++ }
++}
++2010-02-03 Marek Habersack <mhabersack@novell.com>
++
++ * Makefile: added targets to compile cache priority queue tests
++ generator and to generate the tests themselves
++
2010-01-19 Marek Habersack <mhabersack@novell.com>
* standalone-runner.cs: reformatted summary message to match
-r:$(STANDALONE_RUNNER_SUPPORT_ASSEMBLY) \
-r:System.Web.dll
--all-local: HtmlWriter.dll standalone-runner.exe
++CACHE_PQ_TEST_GENERATOR_SOURCES = \
++ CachePQTestGenerator/CacheItemComparer.cs \
++ CachePQTestGenerator/PriorityQueue.cs \
++ CachePQTestGenerator/PriorityQueueState.cs \
++ CachePQTestGenerator/Sequences.cs \
++ CachePQTestGenerator/Utils.cs \
++ CachePQTestGenerator/cache-pq-test-generator.cs \
++ ../../System.Web.Caching/CacheItem.cs \
++ ../../System.Web.Caching/CacheItemPriorityQueue.cs \
++ ../../System.Web.Caching/CacheItemPriorityQueueDebug.cs
++
++CACHE_PQ_TEST_GENERATOR_REFERENCES = \
++ -pkg:dotnet
++
++CACHE_PQ_TEST_SEQUENCES = $(wildcard ./CachePQTestGenerator/Sequences/*.seq)
++
++all-local: HtmlWriter.dll standalone-runner.exe cache-pq-test-generator.exe
HtmlWriter.dll: HtmlWriter.cs
$(MCS) -t:library -r:System.Web.dll $<
standalone-runner.exe: deps $(STANDALONE_RUNNER_SOURCES)
$(MCS) -debug:full $(STANDALONE_RUNNER_REFERENCES) -out:$@ $(STANDALONE_RUNNER_SOURCES)
++cache-pq-test-generator.exe: $(CACHE_PQ_TEST_GENERATOR_SOURCES)
++ $(MCS) -debug:full -d:DEBUG $(CACHE_PQ_TEST_GENERATOR_REFERENCES) -out:$@ $(CACHE_PQ_TEST_GENERATOR_SOURCES)
++
++generate-cache-pq-tests: cache-pq-test-generator.exe
++ $(RUNTIME) cache-pq-test-generator.exe ./CachePQTestGenerator/Sequences/ > ../System.Web.Caching/CacheItemPriorityQueueTest_generated.cs
++
deps:
ifndef STANDALONE_SUPPORT_BUILT
$(MAKE) -C ../../ standalone-runner-support
The default output is a sequence number, the function called and its
arguments.
++
++ * cache-pq-test-generator: a utility to generate NUnit tests for System.Web.Caching
++ CacheItem priority queue, used to store timed cache items. The utility generates
++ code from sequence files (found in CachePQTestGenerator/Sequences/*.seq) which, in turn
++ are generated by the CacheItemPriorityQueue class itself if System.Web is compiled with
++ the DEBUG macro defined. To generate the sequence files just run your application as usual
++ and at the exit a .seq file will be created in the application's root directory.
++ Copy the generated .seq file to the sequences directory mentioned above and run:
++
++ make generate-cache-pq-tests
++
++ which will generate the ../System.Web.Caching/CacheItemPriorityQueueTest_generated.cs file
System.Web.Caching/IOutputCacheEntry.cs
System.Web.Caching/MemoryResponseElement.cs
System.Web.Caching/OutputCache.cs
--System.Web.Caching/OutputCacheProvider.cs
System.Web.Caching/OutputCacheProviderCollection.cs
System.Web.Caching/ResponseElement.cs
System.Web.Caching/SubstitutionResponseElement.cs