Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@ -0,0 +1,63 @@
//
// 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;
}
}
}

View File

@ -0,0 +1,275 @@
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
}
}

View File

@ -0,0 +1,86 @@
//
// 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 int EnqueueCount;
public int DequeueCount;
public int DisableCount;
public int PeekCount;
public int UpdateCount;
public PriorityQueueState ()
{
Queue = new BinaryPriorityQueue (new CacheItemComparer ());
EnqueueCount = 0;
DequeueCount = 0;
DisableCount = 0;
PeekCount = 0;
UpdateCount = 0;
}
public void Enqueue (CacheItem item)
{
Queue.Push (item);
}
public CacheItem Dequeue ()
{
return Queue.Pop () as CacheItem;
}
public CacheItem Peek ()
{
return Queue.Peek () as CacheItem;
}
public void Update (int index)
{
if (index == -1)
return;
Queue.Update (index);
}
}
}

View File

@ -0,0 +1,167 @@
//
// 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 dataDir, 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, dataDir, f, seqNum++);
}
static void RunSequence (StringBuilder sb, string initialIndent, string dataDir, 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 listName = String.Format ("Sequence_{0:00000}.list", seqNum);
string testsName = String.Format ("Sequence_{0:00000}.tests", seqNum);
using (var sw = new StreamWriter (Path.Combine (dataDir, listName), false, Encoding.UTF8))
sw.FormatList (cacheItems);
string indent = initialIndent + "\t";
int idx;
var pq = new PriorityQueueState ();
using (var sw = new StreamWriter (Path.Combine (dataDir, testsName), false, Encoding.UTF8)) {
foreach (EDSequenceEntry entry in edSequence) {
idx = cacheIndex [entry.Item.Guid];
switch (entry.Type) {
case EDSequenceEntryType.Enqueue:
sw.FormatEnqueue (pq, cacheItems, idx);
break;
case EDSequenceEntryType.Dequeue:
sw.FormatDequeue (pq);
break;
case EDSequenceEntryType.Disable:
sw.FormatDisableItem (pq, cacheItems, idx);
break;
case EDSequenceEntryType.Peek:
sw.FormatPeek (pq);
break;
case EDSequenceEntryType.Update:
sw.FormatUpdate (pq, cacheItems, entry.Item, idx);
break;
}
}
sw.FormatQueueSize (pq);
while (pq.Queue.Count > 0)
sw.FormatDequeue (pq);
}
sb.SequenceMethodStart (initialIndent, file, seqNum);
sb.AppendFormat ("{0}RunTest (\"{1}\", \"{2}\");", indent, testsName, listName);
sb.AppendLine ();
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];
bool attrFound;
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.PriorityQueueIndex = -1;
ret.Guid = guid;
cacheItems.Add (ret);
cacheIndex.Add (guid, cacheItems.Count - 1);
return ret;
}
}
}

View File

@ -0,0 +1,26 @@
<?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>

View File

@ -0,0 +1,13 @@
<?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>

View File

@ -0,0 +1,18 @@
<?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>

View File

@ -0,0 +1,53 @@
<?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>

View File

@ -0,0 +1,61 @@
<?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>

View File

@ -0,0 +1,258 @@
//
// 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;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Text;
using System.Web.Caching;
using System.Xml;
using System.Xml.XPath;
using MonoTests.System.Web.Caching;
namespace Tester
{
static class Utils
{
public static T GetOptionalAttribute <T> (this XPathNavigator nav, string name, out bool found)
{
string value = nav.GetAttribute (name, String.Empty);
if (String.IsNullOrEmpty (value)) {
found = false;
return default(T);
}
found = true;
return ConvertAttribute <T> (value);
}
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));
return ConvertAttribute <T> (value);
}
static T ConvertAttribute <T> (string value)
{
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 StreamWriter sw, PriorityQueueState qs)
{
var ti = new CacheItemPriorityQueueTestItem () {
Operation = QueueOperation.QueueSize,
QueueCount = qs.Queue.Count
};
sw.WriteLine (ti.Serialize ());
}
static int FindQueueIndex (PriorityQueueState qs, CacheItem item)
{
CacheItem ci;
for (int i = 0; i < qs.Queue.Count; i++) {
ci = ((IList)qs.Queue) [i] as CacheItem;
if (ci == null)
continue;
if (ci.Guid == item.Guid)
return i;
}
throw new ApplicationException (String.Format ("Failed to find CacheItem with UUID {0} in the queue.", item.Guid));
}
public static void FormatUpdate (this StreamWriter sw, PriorityQueueState qs, List <CacheItem> list, CacheItem updatedItem, int index)
{
CacheItem item = list [index];
item.ExpiresAt = updatedItem.ExpiresAt;
int qidx = FindQueueIndex (qs, item);
qs.Update (qidx);
var ti = new CacheItemPriorityQueueTestItem () {
Operation = QueueOperation.Update,
QueueCount = qs.Queue.Count,
OperationCount = qs.UpdateCount,
ListIndex = index,
ExpiresAt = updatedItem.ExpiresAt,
PriorityQueueIndex = FindQueueIndex (qs, item),
Guid = updatedItem.Guid != null ? updatedItem.Guid.ToString () : null
};
sw.WriteLine (ti.Serialize ());
qs.UpdateCount++;
}
public static void FormatDisableItem (this StreamWriter sw, PriorityQueueState qs, List <CacheItem> list, int index)
{
CacheItem item = list [index];
var ti = new CacheItemPriorityQueueTestItem () {
Operation = QueueOperation.Disable,
QueueCount = qs.Queue.Count,
ListIndex = index,
PriorityQueueIndex = item.PriorityQueueIndex,
OperationCount = qs.DisableCount
};
if (item == null)
ti.IsNull = true;
else {
ti.Guid = item.Guid.ToString ();
ti.IsDisabled = item.Disabled;
ti.Disable = true;
}
sw.WriteLine (ti.Serialize ());
item.Disabled = true;
qs.DisableCount++;
}
public static void FormatDequeue (this StreamWriter sw, PriorityQueueState qs)
{
CacheItem item = qs.Dequeue ();
var ti = new CacheItemPriorityQueueTestItem () {
Operation = QueueOperation.Dequeue,
QueueCount = qs.Queue.Count,
OperationCount = qs.DequeueCount,
PriorityQueueIndex = item.PriorityQueueIndex
};
if (item != null) {
ti.Guid = item.Guid.ToString ();
ti.IsDisabled = item.Disabled;
} else
ti.IsNull = true;
sw.WriteLine (ti.Serialize ());
qs.DequeueCount++;
}
public static void FormatPeek (this StreamWriter sw, PriorityQueueState qs)
{
CacheItem item = qs.Peek ();
var ti = new CacheItemPriorityQueueTestItem () {
Operation = QueueOperation.Peek,
QueueCount = qs.Queue.Count,
OperationCount = qs.PeekCount,
PriorityQueueIndex = item.PriorityQueueIndex
};
if (item != null) {
ti.Guid = item.Guid.ToString ();
ti.IsDisabled = item.Disabled;
} else
ti.IsNull = true;
sw.WriteLine (ti.Serialize ());
qs.PeekCount++;
}
public static void FormatEnqueue (this StreamWriter sw, PriorityQueueState qs, List <CacheItem> list, int index)
{
CacheItem item = list [index];
qs.Enqueue (item);
var ti = new CacheItemPriorityQueueTestItem () {
Operation = QueueOperation.Enqueue,
QueueCount = qs.Queue.Count,
ListIndex = index,
Guid = qs.Peek ().Guid.ToString (),
OperationCount = qs.EnqueueCount,
PriorityQueueIndex = item.PriorityQueueIndex
};
sw.WriteLine (ti.Serialize ());
qs.EnqueueCount++;
}
public static void FormatList (this StreamWriter sw, List <CacheItem> list)
{
if (list == null || list.Count == 0) {
sw.WriteLine ("# No CacheItems found!");
return;
}
sw.WriteLine ("# Each row contains TestCacheItem fields, one item per line, in the following order:");
sw.WriteLine ("# Key, AbsoluteExpiration, SlidingExpiration, Priority, LastChange, ExpiresAt, Disabled, Guid, PriorityQueueIndex");
foreach (CacheItem ci in list)
CreateNewCacheItemInstanceCode (sw, ci);
}
static void CreateNewCacheItemInstanceCode (StreamWriter sw, CacheItem item)
{
sw.Write ("{0},", item.Key.Replace ("\n", "\\n").Replace ("\r", "\\r").Replace (",", "&comma;"));
sw.Write ("{0},", item.AbsoluteExpiration.Ticks);
sw.Write ("{0},", item.SlidingExpiration.Ticks);
sw.Write ("{0},", (int)item.Priority);
sw.Write ("{0},", item.LastChange.Ticks);
sw.Write ("{0},", item.ExpiresAt);
sw.Write ("{0},", item.Disabled.ToString ().ToLowerInvariant ());
sw.Write ("{0},", item.Guid.ToString ());
sw.Write ("{0}", item.PriorityQueueIndex);
sw.WriteLine ();
}
}
}

View File

@ -0,0 +1,55 @@
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 < 2) {
Console.WriteLine ("Usage: cache-pq-test-generator.exe <SEQUENCE_DIRECTORY> <DATA_OUTPUT_DIRECTORY>");
Console.WriteLine ();
Environment.Exit (1);
}
if (!Directory.Exists (args [0])) {
Console.WriteLine ("Sequence directory {0} cannot be found.", args [0]);
Environment.Exit (1);
}
if (!Directory.Exists (args [1]))
Directory.CreateDirectory (args [1]);
var sb = new StringBuilder ();
sb.AppendFormat (@"//
// This source was autogenerated - do not modify it, changes may not be preserved
//
// Generated on: {0}
//
// The test generator can be found in the ../tools/CachePQTestGenerator directory
//
#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
{{", DateTime.Now);
Sequences.Run (sb, args [0], args [1], "\t\t");
sb.Append (" }\n}\n#endif\n");
Console.WriteLine (sb.ToString ());
}
}
}

View File

@ -0,0 +1,23 @@
2010-06-18 Marek Habersack <mhabersack@novell.com>
* standalone-runner.cs: added new command line parameter, --test,
which selects a single test to run instead of the entire suite. It
should be passed a fully qualified (without assembly name) type
name of the test class.
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
NUnit's more closely.
2010-01-14 Marek Habersack <mhabersack@novell.com>
* standalone-runner.cs: added
* Makefile: added build targets for standalone-runner.exe

View File

@ -0,0 +1,291 @@
using System;
using System.IO;
using System.Diagnostics;
using System.Web.UI;
using System.Reflection;
namespace Helper {
public class HtmlWriter : HtmlTextWriter {
bool full_trace;
TextWriter output;
int call_count;
int NextIndex ()
{
return call_count++;
}
public HtmlWriter (TextWriter writer) : this (writer, DefaultTabString)
{
}
public HtmlWriter (TextWriter writer, string tabString) : base (writer, tabString)
{
full_trace = (Environment.GetEnvironmentVariable ("HTMLWRITER_FULLTRACE") == "yes");
string file = Environment.GetEnvironmentVariable ("HTMLWRITER_FILE");
Console.WriteLine ("file: '{0}' (null? {1})", file, file == null);
if (file != null && file != "") {
output = new StreamWriter (new FileStream (file, FileMode.OpenOrCreate | FileMode.Append));
Console.WriteLine ("Sending log to '{0}'.", file);
} else {
output = Console.Out;
}
}
void WriteTrace (StackTrace trace)
{
int n = trace.FrameCount;
for (int i = 0; i < n; i++) {
StackFrame frame = trace.GetFrame (i);
Type type = frame.GetMethod ().DeclaringType;
string ns = type.Namespace;
if (ns != "Helper" && !ns.StartsWith ("System.Web.UI"))
break;
output.Write ("\t{0}.{1}", type.Name, frame);
}
output.WriteLine ();
}
public override void AddAttribute (HtmlTextWriterAttribute key, string value, bool fEncode)
{
output.WriteLine ("{0:###0} AddAttribute ({1}, {2}, {3}))", NextIndex (), key, value, fEncode);
if (full_trace)
WriteTrace (new StackTrace ());
base.AddAttribute (key, value, fEncode);
}
public override void AddAttribute (string name, string value, bool fEncode)
{
output.WriteLine ("{0:###0} AddAttribute ({1}, {2}, {3}))", NextIndex (), name, value, fEncode);
if (full_trace)
WriteTrace (new StackTrace ());
if (fEncode)
; // FIXME
base.AddAttribute (name, value, (HtmlTextWriterAttribute) 0);
}
protected override void AddAttribute (string name, string value, HtmlTextWriterAttribute key)
{
output.WriteLine ("{0:###0} AddAttribute ({1}, {2}, {3}))", NextIndex (), name, value, key);
if (full_trace)
WriteTrace (new StackTrace ());
base.AddAttribute (name, value, key);
}
protected override void AddStyleAttribute (string name, string value, HtmlTextWriterStyle key)
{
output.WriteLine ("{0:###0} AddStyleAttribute ({1}, {2}, {3}))", NextIndex (), name, value, key);
if (full_trace)
WriteTrace (new StackTrace ());
base.AddStyleAttribute (name, value, key);
}
public override void Close ()
{
output.WriteLine ("{0:###0} Close ()", NextIndex ());
if (full_trace)
WriteTrace (new StackTrace ());
if (output != Console.Out)
output.Close ();
base.Close ();
}
protected override string EncodeAttributeValue (HtmlTextWriterAttribute attrKey, string value)
{
output.WriteLine ("{0:###0} EncodeAttributeValue ({1}, {2})", NextIndex (), attrKey, value);
if (full_trace)
WriteTrace (new StackTrace ());
return base.EncodeAttributeValue (attrKey, value);
}
protected override void FilterAttributes ()
{
output.WriteLine ("{0:###0} FilterAttributes ()", NextIndex ());
if (full_trace)
WriteTrace (new StackTrace ());
base.FilterAttributes ();
}
public override void Flush ()
{
output.WriteLine ("{0:###0} Flush ()", NextIndex ());
if (full_trace)
WriteTrace (new StackTrace ());
base.Flush ();
}
protected override HtmlTextWriterTag GetTagKey (string tagName)
{
output.WriteLine ("{0:###0} GetTagKey ({1})", NextIndex (), tagName);
if (full_trace)
WriteTrace (new StackTrace ());
return base.GetTagKey (tagName);
}
protected override string GetTagName (HtmlTextWriterTag tagKey)
{
output.WriteLine ("{0:###0} GetTagName ({1})", NextIndex (), tagKey);
if (full_trace)
WriteTrace (new StackTrace ());
return base.GetTagName (tagKey);
}
protected override bool OnAttributeRender (string name, string value, HtmlTextWriterAttribute key)
{
output.WriteLine ("{0:###0} OnAttributeRender ({1}, {2}, {3})", NextIndex (), name, value, key);
if (full_trace)
WriteTrace (new StackTrace ());
return base.OnAttributeRender (name, value, key);
}
protected override bool OnStyleAttributeRender (string name, string value, HtmlTextWriterStyle key)
{
output.WriteLine ("{0:###0} OnStyleAttributeRender ({1}, {2}, {3})", NextIndex (), name, value, key);
if (full_trace)
WriteTrace (new StackTrace ());
return base.OnStyleAttributeRender (name, value, key);
}
protected override bool OnTagRender (string name, HtmlTextWriterTag key)
{
output.WriteLine ("{0:###0} OnTagRender ({1}, {2})", NextIndex (), name, key);
if (full_trace)
WriteTrace (new StackTrace ());
return base.OnTagRender (name, key);
}
protected override void OutputTabs ()
{
output.WriteLine ("{0:###0} OutputTabs ()", NextIndex ());
if (full_trace)
WriteTrace (new StackTrace ());
base.OutputTabs ();
}
protected override string RenderAfterContent ()
{
output.WriteLine ("{0:###0} RenderAfterContent ()", NextIndex ());
if (full_trace)
WriteTrace (new StackTrace ());
return null;
}
protected override string RenderAfterTag ()
{
output.WriteLine ("{0:###0} RenderAfterTag ()", NextIndex ());
if (full_trace)
WriteTrace (new StackTrace ());
return null;
}
protected override string RenderBeforeContent ()
{
output.WriteLine ("{0:###0} RenderBeforeContent ()", NextIndex ());
if (full_trace)
WriteTrace (new StackTrace ());
return null;
}
protected override string RenderBeforeTag ()
{
output.WriteLine ("{0:###0} RenderBeforeTag ()", NextIndex ());
if (full_trace)
WriteTrace (new StackTrace ());
return null;
}
public override void RenderBeginTag (string tagName)
{
output.WriteLine ("{0:###0} RenderBeginTag ({1})", NextIndex (), tagName);
if (full_trace)
WriteTrace (new StackTrace ());
base.RenderBeginTag (tagName);
}
public override void RenderBeginTag (HtmlTextWriterTag tagKey)
{
output.WriteLine ("{0:###0} RenderBeginTag ({1})", NextIndex (), tagKey);
if (full_trace)
WriteTrace (new StackTrace ());
base.RenderBeginTag (tagKey);
}
public override void RenderEndTag ()
{
output.WriteLine ("{0:###0} RenderEndTag ()", NextIndex ());
if (full_trace)
WriteTrace (new StackTrace ());
base.RenderEndTag ();
}
public override void WriteAttribute (string name, string value, bool fEncode)
{
output.WriteLine ("{0:###0} WriteAttribute ({1}, {2}, {3})", NextIndex (), name, value, fEncode);
if (full_trace)
WriteTrace (new StackTrace ());
base.WriteAttribute (name, value, fEncode);
}
public override void WriteBeginTag (string tagName)
{
output.WriteLine ("{0:###0} WriteBeginTag ({1})", NextIndex (), tagName);
if (full_trace)
WriteTrace (new StackTrace ());
base.WriteBeginTag (tagName);
}
public override void WriteEndTag (string tagName)
{
output.WriteLine ("{0:###0} WriteEndTag ({1})", NextIndex (), tagName);
if (full_trace)
WriteTrace (new StackTrace ());
base.WriteEndTag (tagName);
}
public override void WriteFullBeginTag (string tagName)
{
output.WriteLine ("{0:###0} WriteFullBeginTag ({1})", NextIndex (), tagName);
if (full_trace)
WriteTrace (new StackTrace ());
base.WriteFullBeginTag (tagName);
}
public override void WriteStyleAttribute (string name, string value, bool fEncode)
{
output.WriteLine ("{0:###0} WriteStyleAttribute ({1}, {2}, {3})", NextIndex (), name, value, fEncode);
if (full_trace)
WriteTrace (new StackTrace ());
base.WriteStyleAttribute (name, value, fEncode);
}
}
}

View File

@ -0,0 +1,63 @@
thisdir = class/System.Web/Test/tools
include ../../../../build/rules.make
CLASSLIB_DIR = $(topdir)/class/lib/$(PROFILE)
STANDALONE_RUNNER_SUPPORT_ASSEMBLY = $(CLASSLIB_DIR)/standalone-runner-support.dll
STANDALONE_RUNNER_SOURCES = \
standalone-runner.cs \
../../../Mono.Options/Mono.Options/Options.cs \
STANDALONE_RUNNER_REFERENCES = \
-lib:$(CLASSLIB_DIR) \
-r:$(STANDALONE_RUNNER_SUPPORT_ASSEMBLY) \
-r:System.Web.dll
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 \
../System.Web.Caching/CacheItemPriorityQueueTestSupport.cs
CACHE_PQ_TEST_GENERATOR_REFERENCES = \
-lib:$(CLASSLIB_DIR) \
-pkg:dotnet
CACHE_PQ_TEST_SEQUENCES = $(wildcard ./CachePQTestGenerator/Sequences/*.seq)
CACHE_PQ_TEST_PACKED_SEQUENCES = $(wildcard ./CachePQTestGenerator/Sequences/*.seq.gz)
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
for f in $(patsubst %.seq.gz,%.seq,$(CACHE_PQ_TEST_PACKED_SEQUENCES)); do \
gunzip -c $$f.gz > $$f ; \
done ;
$(RUNTIME) --debug cache-pq-test-generator.exe ./CachePQTestGenerator/Sequences/ ../System.Web.Caching/CacheItemPriorityQueueTestData/ > ../System.Web.Caching/CacheItemPriorityQueueTest_generated.cs
deps:
ifndef STANDALONE_SUPPORT_BUILT
$(MAKE) -C ../../ standalone-runner-support
endif
clean:
rm -f HtmlWriter.dll HtmlWriter.*db
rm -f standalone-runner.exe standalone-runner.*db
for f in $(patsubst %.seq.gz,%.seq,$(CACHE_PQ_TEST_PACKED_SEQUENCES)); do \
rm -f $$f ; \
done ;

View File

@ -0,0 +1,34 @@
Tools
-------
* HtmlWriter.cs: it provides a custom HtmlTextWriter implementation with
logging capabilities to help figuring out which method in HtmlTextWriter
you should invoke and where to do it.
How to use it.
---------------
* Run 'make'. It will generate HtmlWriter.dll.
* Copy HtmlWriter.dll to the 'bin' directory.
* Copy web.config to the directory in which you run xsp
(the parent of 'bin').
* There are 2 environment variables used:
-HTMLWRITER_FULLTRACE=yes: displays the stack trace for
every method called.
-HTMLWRITER_FILE=[yourfilename]: output goes to a file
instead of stdout.
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

View File

@ -0,0 +1,251 @@
//
//
// 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.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Text;
using System.Web;
using System.Web.Hosting;
using Mono.Options;
using StandAloneRunnerSupport;
namespace StandAloneRunner
{
sealed class StandAloneRunner
{
static string testsAssembly;
static void Usage (int exitCode, OptionSet options)
{
Console.WriteLine (@"Usage: standalone-runner [OPTIONS] <TESTS_ASSEMBLY>");
if (options != null) {
Console.WriteLine ();
Console.WriteLine ("Available options:");
options.WriteOptionDescriptions (Console.Out);
}
Console.WriteLine ();
Environment.Exit (exitCode);
}
public static void Die (string format, params object[] args)
{
Console.WriteLine ("Standalone test failure in assembly '{0}'.", testsAssembly);
Console.WriteLine ();
if (args == null || args.Length == 0)
Console.WriteLine ("Error: " + format);
else
Console.WriteLine ("Error: " + format, args);
Environment.Exit (1);
}
static void Main (string[] args)
{
try {
Run (args);
} catch (Exception ex) {
Die ("Exception caught:{0}{1}", Environment.NewLine, ex.ToString ());
}
}
static void Run (string[] args)
{
bool showHelp = false;
string testName = null;
string outputName = null;
bool verbose = false;
var options = new OptionSet () {
{"?|h|help", "Show short usage screen.", v => showHelp = true},
{"t=|test=", "Run this test only (full type name)", (string s) => testName = s},
{"o=|output=", "Output test results to the console and to the indicated file", (string s) => outputName = s},
{"v|verbose", "Print the running test name", v => verbose = true}
};
List <string> extra = options.Parse (args);
int extraCount = extra.Count;
if (showHelp || extraCount < 1)
Usage (showHelp ? 0 : 1, options);
testsAssembly = extra [0];
if (!File.Exists (testsAssembly))
Die ("Tests assembly '{0}' does not exist.", testsAssembly);
Assembly asm = Assembly.LoadFrom (testsAssembly);
var tests = new List <StandaloneTest> ();
LoadTestsFromAssembly (asm, tests);
if (tests.Count == 0)
Die ("No tests present in the '{0}' assembly. Tests must be public types decorated with the TestCase attribute and implementing the ITestCase interface.", testsAssembly);
ApplicationManager appMan = ApplicationManager.GetApplicationManager ();
int runCounter = 0;
int failedCounter = 0;
var reports = new List <string> ();
Console.WriteLine ("Running tests:");
DateTime start = DateTime.Now;
foreach (StandaloneTest test in tests) {
if (test.Info.Disabled)
continue;
if (!String.IsNullOrEmpty (testName)) {
if (String.Compare (test.TestType.FullName, testName) != 0)
continue;
}
test.Run (appMan, verbose);
runCounter++;
if (!test.Success) {
failedCounter++;
reports.Add (FormatReport (test));
}
}
DateTime end = DateTime.Now;
Console.WriteLine ();
StreamWriter writer;
if (!String.IsNullOrEmpty (outputName))
writer = new StreamWriter (outputName);
else
writer = null;
try {
string report;
if (reports.Count > 0) {
int repCounter = 0;
int numWidth = reports.Count.ToString ().Length;
string indent = String.Empty.PadLeft (numWidth + 2);
string numFormat = "{0," + numWidth + "}) ";
foreach (string r in reports) {
repCounter++;
Console.Write (numFormat, repCounter);
report = FormatLines (indent, r, Environment.NewLine, true);
Console.WriteLine (report);
if (writer != null) {
writer.Write (numFormat, repCounter);
writer.WriteLine (report);
}
}
} else
Console.WriteLine ();
report = String.Format ("Tests run: {0}; Total tests: {1}; Failed: {2}; Not run: {3}; Time taken: {4}",
runCounter, tests.Count, failedCounter, tests.Count - runCounter, end - start);
Console.WriteLine (report);
if (writer != null)
writer.WriteLine (report);
} finally {
if (writer != null) {
writer.Close ();
writer.Dispose ();
}
}
}
static string FormatReport (StandaloneTest test)
{
var sb = new StringBuilder ();
string newline = Environment.NewLine;
sb.AppendFormat ("{0}{1}", test.Info.Name, newline);
sb.AppendFormat ("{0,16}: {1}{2}", "Test", test.TestType, newline);
if (!String.IsNullOrEmpty (test.Info.Description))
sb.AppendFormat ("{0,16}: {1}{2}", "Description", test.Info.Description, newline);
if (!String.IsNullOrEmpty (test.FailedUrl))
sb.AppendFormat ("{0,16}: {1}{2}", "Failed URL", test.FailedUrl, newline);
if (!String.IsNullOrEmpty (test.FailedUrlCallbackName))
sb.AppendFormat ("{0,16}: {1}{2}", "Callback method", test.FailedUrlCallbackName, newline);
if (!String.IsNullOrEmpty (test.FailedUrlDescription))
sb.AppendFormat ("{0,16}: {1}{2}", "URL description", test.FailedUrlDescription, newline);
if (!String.IsNullOrEmpty (test.FailureDetails))
sb.AppendFormat ("{0,16}:{2}{1}{2}", "Failure details", FormatLines (" ", test.FailureDetails, newline, false), newline);
if (test.Exception != null)
sb.AppendFormat ("{0,16}:{2}{1}{2}", "Exception", FormatLines (" ", test.Exception.ToString (), newline, false), newline);
return sb.ToString ();
}
static string FormatLines (string indent, string text, string newline, bool skipFirst)
{
var sb = new StringBuilder ();
bool first = true;
foreach (string s in text.Split (new string[] { newline }, StringSplitOptions.None)) {
if (skipFirst && first)
first = false;
else
sb.Append (indent);
sb.Append (s);
sb.Append (newline);
}
sb.Length -= newline.Length;
return sb.ToString ();
}
static void LoadTestsFromAssembly (Assembly asm, List <StandaloneTest> tests)
{
Type[] types = asm.GetExportedTypes ();
if (types.Length == 0)
return;
object[] attributes;
foreach (var t in types) {
if (!t.IsClass || t.IsAbstract || t.IsGenericTypeDefinition)
continue;
attributes = t.GetCustomAttributes (typeof (TestCaseAttribute), false);
if (attributes.Length == 0)
continue;
if (!typeof (ITestCase).IsAssignableFrom (t))
continue;
tests.Add (new StandaloneTest (t, attributes [0] as TestCaseAttribute));
}
}
}
}

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true" batch="false"/>
<authentication mode= "Forms">
</authentication>
<browserCaps>
<use var="HTTP_USER_AGENT" />
<filter>
<case match=".*">
tagwriter=Helper.HtmlWriter,HtmlWriter
</case>
</filter>
</browserCaps>
</system.web>
</configuration>