diff --git a/README.markdown b/README.markdown index 69b1b9de1..577961acd 100644 --- a/README.markdown +++ b/README.markdown @@ -1,9 +1,6 @@ -# RestSharp .NET 2.0 Fork - Simple .NET REST Client +# RestSharp .NET 4.8 Fork - Simple .NET REST Client -This is a fork of RestSharp for ,NET 2.0. - -To get it to work correctly we have included System.Xml.Linq from Mono project, and LinqBridge.cs, -so you may run into conflicts should you have other .NET2 projects that have done the same +This is a fork of RestSharp targeting .NET Framework 4.8. ### [Official Site/Blog][1] - [@RestSharp][2] ### Please use the [Google Group][3] for feature requests and troubleshooting usage. @@ -11,7 +8,7 @@ so you may run into conflicts should you have other .NET2 projects that have don ### Features -* Supports .NET 3.5+, Silverlight 4, Windows Phone 7, Mono, MonoTouch +* Supports .NET 4.8, Silverlight 4, Windows Phone 7, Mono, MonoTouch * Automatic XML and JSON deserialization * Supports custom serialization and deserialization via ISerializer and IDeserializer * Fuzzy element name matching ('product_id' in XML/JSON will match C# property named 'ProductId') diff --git a/RestSharp.IntegrationTests/RestSharp.IntegrationTests.csproj b/RestSharp.IntegrationTests/RestSharp.IntegrationTests.csproj index 3af6d3743..90829e909 100644 --- a/RestSharp.IntegrationTests/RestSharp.IntegrationTests.csproj +++ b/RestSharp.IntegrationTests/RestSharp.IntegrationTests.csproj @@ -10,7 +10,7 @@ Properties RestSharp.IntegrationTests RestSharp.IntegrationTests - v4.0 + v4.8 512 @@ -40,21 +40,25 @@ - - 3.5 - - - 3.5 - + + - + + False + ..\packages\xunit.abstractions.2.0.3\lib\net35\xunit.abstractions.dll + + + False + ..\packages\xunit.assert.2.4.2\lib\netstandard1.1\xunit.assert.dll + + False - ..\packages\xunit.1.9.0.1566\lib\xunit.dll + ..\packages\xunit.extensibility.core.2.4.2\lib\net452\xunit.core.dll - + False - ..\packages\xunit.extensions.1.9.0.1566\lib\xunit.extensions.dll + ..\packages\xunit.extensibility.execution.2.4.2\lib\net452\xunit.execution.desktop.dll diff --git a/RestSharp.IntegrationTests/packages.config b/RestSharp.IntegrationTests/packages.config index d82739c0b..aa44a9325 100644 --- a/RestSharp.IntegrationTests/packages.config +++ b/RestSharp.IntegrationTests/packages.config @@ -1,5 +1,11 @@  - - - \ No newline at end of file + + + + + + + + + diff --git a/RestSharp.Net2.sln b/RestSharp.Net2.sln index 9ea2d812b..9660bcc77 100644 --- a/RestSharp.Net2.sln +++ b/RestSharp.Net2.sln @@ -1,6 +1,6 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RestSharp", "RestSharp\RestSharp.csproj", "{2ECECFBF-5F3E-40EE-A963-72336DC7ABE2}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{E709A928-A45C-4622-A35C-CCD8EE44CA80}" diff --git a/RestSharp.Net2/LinqBridge-1.2.cs b/RestSharp.Net2/LinqBridge-1.2.cs deleted file mode 100644 index 14c1aff68..000000000 --- a/RestSharp.Net2/LinqBridge-1.2.cs +++ /dev/null @@ -1,3103 +0,0 @@ -#region License, Terms and Author(s) -// -// LINQBridge -// Copyright (c) 2007-9 Atif Aziz, Joseph Albahari. All rights reserved. -// -// Author(s): -// -// Atif Aziz, http://www.raboof.com -// -// This library is free software; you can redistribute it and/or modify it -// under the terms of the New BSD License, a copy of which should have -// been delivered along with this distribution. -// -// 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. -// -#endregion - -// $Id: Enumerable.cs 240 2010-10-19 21:49:03Z azizatif $ - -namespace System.Linq -{ - #region Imports - - using System; - using System.Collections; - using System.Collections.Generic; - using System.Diagnostics; - using LinqBridge; - - #endregion - - /// - /// Provides a set of static (Shared in Visual Basic) methods for - /// querying objects that implement . - /// - - static partial class Enumerable - { - /// - /// Returns the input typed as . - /// - - public static IEnumerable AsEnumerable(IEnumerable source) - { - return source; - } - - /// - /// Returns an empty that has the - /// specified type argument. - /// - - public static IEnumerable Empty() - { - return Sequence.Empty; - } - - /// - /// Converts the elements of an to the - /// specified type. - /// - - public static IEnumerable Cast( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - return CastYield(source); - } - - private static IEnumerable CastYield( - IEnumerable source) - { - foreach (var item in source) - yield return (TResult)item; - } - - /// - /// Filters the elements of an based on a specified type. - /// - - public static IEnumerable OfType( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - return OfTypeYield(source); - } - - private static IEnumerable OfTypeYield( - IEnumerable source) - { - foreach (var item in source) - if (item is TResult) - yield return (TResult)item; - } - - /// - /// Generates a sequence of integral numbers within a specified range. - /// - /// The value of the first integer in the sequence. - /// The number of sequential integers to generate. - - public static IEnumerable Range(int start, int count) - { - if (count < 0) - throw new ArgumentOutOfRangeException("count", count, null); - - var end = (long)start + count; - if (end - 1 >= int.MaxValue) - throw new ArgumentOutOfRangeException("count", count, null); - - return RangeYield(start, end); - } - - private static IEnumerable RangeYield(int start, long end) - { - for (var i = start; i < end; i++) - yield return i; - } - - /// - /// Generates a sequence that contains one repeated value. - /// - - public static IEnumerable Repeat(TResult element, int count) - { - if (count < 0) throw new ArgumentOutOfRangeException("count", count, null); - - return RepeatYield(element, count); - } - - private static IEnumerable RepeatYield(TResult element, int count) - { - for (var i = 0; i < count; i++) - yield return element; - } - - /// - /// Filters a sequence of values based on a predicate. - /// - - public static IEnumerable Where( - this IEnumerable source, - Func predicate) - { - CheckNotNull(predicate, "predicate"); - - return source.Where((item, i) => predicate(item)); - } - - /// - /// Filters a sequence of values based on a predicate. - /// Each element's index is used in the logic of the predicate function. - /// - - public static IEnumerable Where( - this IEnumerable source, - Func predicate) - { - CheckNotNull(source, "source"); - CheckNotNull(predicate, "predicate"); - - return WhereYield(source, predicate); - } - - private static IEnumerable WhereYield( - IEnumerable source, - Func predicate) - { - var i = 0; - foreach (var item in source) - if (predicate(item, i++)) - yield return item; - } - - /// - /// Projects each element of a sequence into a new form. - /// - - public static IEnumerable Select( - this IEnumerable source, - Func selector) - { - CheckNotNull(selector, "selector"); - - return source.Select((item, i) => selector(item)); - } - - /// - /// Projects each element of a sequence into a new form by - /// incorporating the element's index. - /// - - public static IEnumerable Select( - this IEnumerable source, - Func selector) - { - CheckNotNull(source, "source"); - CheckNotNull(selector, "selector"); - - return SelectYield(source, selector); - } - - private static IEnumerable SelectYield( - IEnumerable source, - Func selector) - { - var i = 0; - foreach (var item in source) - yield return selector(item, i++); - } - - /// - /// Projects each element of a sequence to an - /// and flattens the resulting sequences into one sequence. - /// - - public static IEnumerable SelectMany( - this IEnumerable source, - Func> selector) - { - CheckNotNull(selector, "selector"); - - return source.SelectMany((item, i) => selector(item)); - } - - /// - /// Projects each element of a sequence to an , - /// and flattens the resulting sequences into one sequence. The - /// index of each source element is used in the projected form of - /// that element. - /// - - public static IEnumerable SelectMany( - this IEnumerable source, - Func> selector) - { - CheckNotNull(selector, "selector"); - - return source.SelectMany(selector, (item, subitem) => subitem); - } - - /// - /// Projects each element of a sequence to an , - /// flattens the resulting sequences into one sequence, and invokes - /// a result selector function on each element therein. - /// - - public static IEnumerable SelectMany( - this IEnumerable source, - Func> collectionSelector, - Func resultSelector) - { - CheckNotNull(collectionSelector, "collectionSelector"); - - return source.SelectMany((item, i) => collectionSelector(item), resultSelector); - } - - /// - /// Projects each element of a sequence to an , - /// flattens the resulting sequences into one sequence, and invokes - /// a result selector function on each element therein. The index of - /// each source element is used in the intermediate projected form - /// of that element. - /// - - public static IEnumerable SelectMany( - this IEnumerable source, - Func> collectionSelector, - Func resultSelector) - { - CheckNotNull(source, "source"); - CheckNotNull(collectionSelector, "collectionSelector"); - CheckNotNull(resultSelector, "resultSelector"); - - return SelectManyYield(source, collectionSelector, resultSelector); - } - - private static IEnumerable SelectManyYield( - this IEnumerable source, - Func> collectionSelector, - Func resultSelector) - { - var i = 0; - foreach (var item in source) - foreach (var subitem in collectionSelector(item, i++)) - yield return resultSelector(item, subitem); - } - - /// - /// Returns elements from a sequence as long as a specified condition is true. - /// - - public static IEnumerable TakeWhile( - this IEnumerable source, - Func predicate) - { - CheckNotNull(predicate, "predicate"); - - return source.TakeWhile((item, i) => predicate(item)); - } - - /// - /// Returns elements from a sequence as long as a specified condition is true. - /// The element's index is used in the logic of the predicate function. - /// - - public static IEnumerable TakeWhile( - this IEnumerable source, - Func predicate) - { - CheckNotNull(source, "source"); - CheckNotNull(predicate, "predicate"); - - return TakeWhileYield(source, predicate); - } - - private static IEnumerable TakeWhileYield( - this IEnumerable source, - Func predicate) - { - var i = 0; - foreach (var item in source) - if (predicate(item, i++)) - yield return item; - else - break; - } - - private static class Futures - { - public static readonly Func Default = () => default(T); - public static readonly Func Undefined = () => { throw new InvalidOperationException(); }; - } - - /// - /// Base implementation of First operator. - /// - - private static TSource FirstImpl( - this IEnumerable source, - Func empty) - { - CheckNotNull(source, "source"); - Debug.Assert(empty != null); - - var list = source as IList; // optimized case for lists - if (list != null) - return list.Count > 0 ? list[0] : empty(); - - using (var e = source.GetEnumerator()) // fallback for enumeration - return e.MoveNext() ? e.Current : empty(); - } - - /// - /// Returns the first element of a sequence. - /// - - public static TSource First( - this IEnumerable source) - { - return source.FirstImpl(Futures.Undefined); - } - - /// - /// Returns the first element in a sequence that satisfies a specified condition. - /// - - public static TSource First( - this IEnumerable source, - Func predicate) - { - return First(source.Where(predicate)); - } - - /// - /// Returns the first element of a sequence, or a default value if - /// the sequence contains no elements. - /// - - public static TSource FirstOrDefault( - this IEnumerable source) - { - return source.FirstImpl(Futures.Default); - } - - /// - /// Returns the first element of the sequence that satisfies a - /// condition or a default value if no such element is found. - /// - - public static TSource FirstOrDefault( - this IEnumerable source, - Func predicate) - { - return FirstOrDefault(source.Where(predicate)); - } - - /// - /// Base implementation of Last operator. - /// - - private static TSource LastImpl( - this IEnumerable source, - Func empty) - { - CheckNotNull(source, "source"); - - var list = source as IList; // optimized case for lists - if (list != null) - return list.Count > 0 ? list[list.Count - 1] : empty(); - - using (var e = source.GetEnumerator()) - { - if (!e.MoveNext()) - return empty(); - - var last = e.Current; - while (e.MoveNext()) - last = e.Current; - - return last; - } - } - - /// - /// Returns the last element of a sequence. - /// - public static TSource Last( - this IEnumerable source) - { - return source.LastImpl(Futures.Undefined); - } - - /// - /// Returns the last element of a sequence that satisfies a - /// specified condition. - /// - - public static TSource Last( - this IEnumerable source, - Func predicate) - { - return Last(source.Where(predicate)); - } - - /// - /// Returns the last element of a sequence, or a default value if - /// the sequence contains no elements. - /// - - public static TSource LastOrDefault( - this IEnumerable source) - { - return source.LastImpl(Futures.Default); - } - - /// - /// Returns the last element of a sequence that satisfies a - /// condition or a default value if no such element is found. - /// - - public static TSource LastOrDefault( - this IEnumerable source, - Func predicate) - { - return LastOrDefault(source.Where(predicate)); - } - - /// - /// Base implementation of Single operator. - /// - - private static TSource SingleImpl( - this IEnumerable source, - Func empty) - { - CheckNotNull(source, "source"); - - using (var e = source.GetEnumerator()) - { - if (e.MoveNext()) - { - var single = e.Current; - if (!e.MoveNext()) - return single; - - throw new InvalidOperationException(); - } - - return empty(); - } - } - - /// - /// Returns the only element of a sequence, and throws an exception - /// if there is not exactly one element in the sequence. - /// - - public static TSource Single( - this IEnumerable source) - { - return source.SingleImpl(Futures.Undefined); - } - - /// - /// Returns the only element of a sequence that satisfies a - /// specified condition, and throws an exception if more than one - /// such element exists. - /// - - public static TSource Single( - this IEnumerable source, - Func predicate) - { - return Single(source.Where(predicate)); - } - - /// - /// Returns the only element of a sequence, or a default value if - /// the sequence is empty; this method throws an exception if there - /// is more than one element in the sequence. - /// - - public static TSource SingleOrDefault( - this IEnumerable source) - { - return source.SingleImpl(Futures.Default); - } - - /// - /// Returns the only element of a sequence that satisfies a - /// specified condition or a default value if no such element - /// exists; this method throws an exception if more than one element - /// satisfies the condition. - /// - - public static TSource SingleOrDefault( - this IEnumerable source, - Func predicate) - { - return SingleOrDefault(source.Where(predicate)); - } - - /// - /// Returns the element at a specified index in a sequence. - /// - - public static TSource ElementAt( - this IEnumerable source, - int index) - { - CheckNotNull(source, "source"); - - if (index < 0) - throw new ArgumentOutOfRangeException("index", index, null); - - var list = source as IList; - if (list != null) - return list[index]; - - try - { - return source.SkipWhile((item, i) => i < index).First(); - } - catch (InvalidOperationException) // if thrown by First - { - throw new ArgumentOutOfRangeException("index", index, null); - } - } - - /// - /// Returns the element at a specified index in a sequence or a - /// default value if the index is out of range. - /// - - public static TSource ElementAtOrDefault( - this IEnumerable source, - int index) - { - CheckNotNull(source, "source"); - - if (index < 0) - return default(TSource); - - var list = source as IList; - if (list != null) - return index < list.Count ? list[index] : default(TSource); - - return source.SkipWhile((item, i) => i < index).FirstOrDefault(); - } - - /// - /// Inverts the order of the elements in a sequence. - /// - - public static IEnumerable Reverse( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - return ReverseYield(source); - } - - private static IEnumerable ReverseYield(IEnumerable source) - { - var stack = new Stack(); - foreach (var item in source) - stack.Push(item); - - foreach (var item in stack) - yield return item; - } - - /// - /// Returns a specified number of contiguous elements from the start - /// of a sequence. - /// - - public static IEnumerable Take( - this IEnumerable source, - int count) - { - return source.Where((item, i) => i < count); - } - - /// - /// Bypasses a specified number of elements in a sequence and then - /// returns the remaining elements. - /// - - public static IEnumerable Skip( - this IEnumerable source, - int count) - { - return source.Where((item, i) => i >= count); - } - - /// - /// Bypasses elements in a sequence as long as a specified condition - /// is true and then returns the remaining elements. - /// - - public static IEnumerable SkipWhile( - this IEnumerable source, - Func predicate) - { - CheckNotNull(predicate, "predicate"); - - return source.SkipWhile((item, i) => predicate(item)); - } - - /// - /// Bypasses elements in a sequence as long as a specified condition - /// is true and then returns the remaining elements. The element's - /// index is used in the logic of the predicate function. - /// - - public static IEnumerable SkipWhile( - this IEnumerable source, - Func predicate) - { - CheckNotNull(source, "source"); - CheckNotNull(predicate, "predicate"); - - return SkipWhileYield(source, predicate); - } - - private static IEnumerable SkipWhileYield( - IEnumerable source, - Func predicate) - { - using (var e = source.GetEnumerator()) - { - for (var i = 0; ; i++) - { - if (!e.MoveNext()) - yield break; - - if (!predicate(e.Current, i)) - break; - } - - do { yield return e.Current; } while (e.MoveNext()); - } - } - - /// - /// Returns the number of elements in a sequence. - /// - - public static int Count( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - var collection = source as ICollection; - return collection != null - ? collection.Count - : source.Aggregate(0, (count, item) => checked(count + 1)); - } - - /// - /// Returns a number that represents how many elements in the - /// specified sequence satisfy a condition. - /// - - public static int Count( - this IEnumerable source, - Func predicate) - { - return Count(source.Where(predicate)); - } - - /// - /// Returns an that represents the total number - /// of elements in a sequence. - /// - - public static long LongCount( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - var array = source as Array; - return array != null - ? array.LongLength - : source.Aggregate(0L, (count, item) => count + 1); - } - - /// - /// Returns an that represents how many elements - /// in a sequence satisfy a condition. - /// - - public static long LongCount( - this IEnumerable source, - Func predicate) - { - return LongCount(source.Where(predicate)); - } - - /// - /// Concatenates two sequences. - /// - - public static IEnumerable Concat( - this IEnumerable first, - IEnumerable second) - { - CheckNotNull(first, "first"); - CheckNotNull(second, "second"); - - return ConcatYield(first, second); - } - - private static IEnumerable ConcatYield( - IEnumerable first, - IEnumerable second) - { - foreach (var item in first) - yield return item; - - foreach (var item in second) - yield return item; - } - - /// - /// Creates a from an . - /// - - public static List ToList( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - return new List(source); - } - - /// - /// Creates an array from an . - /// - - public static TSource[] ToArray( - this IEnumerable source) - { - return source.ToList().ToArray(); - } - - /// - /// Returns distinct elements from a sequence by using the default - /// equality comparer to compare values. - /// - - public static IEnumerable Distinct( - this IEnumerable source) - { - return Distinct(source, /* comparer */ null); - } - - /// - /// Returns distinct elements from a sequence by using a specified - /// to compare values. - /// - - public static IEnumerable Distinct( - this IEnumerable source, - IEqualityComparer comparer) - { - CheckNotNull(source, "source"); - - return DistinctYield(source, comparer); - } - - private static IEnumerable DistinctYield( - IEnumerable source, - IEqualityComparer comparer) - { - var set = new Dictionary(comparer); - var gotNull = false; - - foreach (var item in source) - { - if (item == null) - { - if (gotNull) - continue; - gotNull = true; - } - else - { - if (set.ContainsKey(item)) - continue; - set.Add(item, null); - } - - yield return item; - } - } - - /// - /// Creates a from an - /// according to a specified key - /// selector function. - /// - - public static ILookup ToLookup( - this IEnumerable source, - Func keySelector) - { - return ToLookup(source, keySelector, e => e, /* comparer */ null); - } - - /// - /// Creates a from an - /// according to a specified key - /// selector function and a key comparer. - /// - - public static ILookup ToLookup( - this IEnumerable source, - Func keySelector, - IEqualityComparer comparer) - { - return ToLookup(source, keySelector, e => e, comparer); - } - - /// - /// Creates a from an - /// according to specified key - /// and element selector functions. - /// - - public static ILookup ToLookup( - this IEnumerable source, - Func keySelector, - Func elementSelector) - { - return ToLookup(source, keySelector, elementSelector, /* comparer */ null); - } - - /// - /// Creates a from an - /// according to a specified key - /// selector function, a comparer and an element selector function. - /// - - public static ILookup ToLookup( - this IEnumerable source, - Func keySelector, - Func elementSelector, - IEqualityComparer comparer) - { - CheckNotNull(source, "source"); - CheckNotNull(keySelector, "keySelector"); - CheckNotNull(elementSelector, "elementSelector"); - - var lookup = new Lookup(comparer); - - foreach (var item in source) - { - var key = keySelector(item); - - var grouping = (Grouping)lookup.Find(key); - if (grouping == null) - { - grouping = new Grouping(key); - lookup.Add(grouping); - } - - grouping.Add(elementSelector(item)); - } - - return lookup; - } - - /// - /// Groups the elements of a sequence according to a specified key - /// selector function. - /// - - public static IEnumerable> GroupBy( - this IEnumerable source, - Func keySelector) - { - return GroupBy(source, keySelector, /* comparer */ null); - } - - /// - /// Groups the elements of a sequence according to a specified key - /// selector function and compares the keys by using a specified - /// comparer. - /// - - public static IEnumerable> GroupBy( - this IEnumerable source, - Func keySelector, - IEqualityComparer comparer) - { - return GroupBy(source, keySelector, e => e, comparer); - } - - /// - /// Groups the elements of a sequence according to a specified key - /// selector function and projects the elements for each group by - /// using a specified function. - /// - - public static IEnumerable> GroupBy( - this IEnumerable source, - Func keySelector, - Func elementSelector) - { - return GroupBy(source, keySelector, elementSelector, /* comparer */ null); - } - - /// - /// Groups the elements of a sequence according to a specified key - /// selector function and creates a result value from each group and - /// its key. - /// - - public static IEnumerable> GroupBy( - this IEnumerable source, - Func keySelector, - Func elementSelector, - IEqualityComparer comparer) - { - CheckNotNull(source, "source"); - CheckNotNull(keySelector, "keySelector"); - CheckNotNull(elementSelector, "elementSelector"); - - return ToLookup(source, keySelector, elementSelector, comparer); - } - - /// - /// Groups the elements of a sequence according to a key selector - /// function. The keys are compared by using a comparer and each - /// group's elements are projected by using a specified function. - /// - - public static IEnumerable GroupBy( - this IEnumerable source, - Func keySelector, - Func, TResult> resultSelector) - { - return GroupBy(source, keySelector, resultSelector, /* comparer */ null); - } - - /// - /// Groups the elements of a sequence according to a specified key - /// selector function and creates a result value from each group and - /// its key. The elements of each group are projected by using a - /// specified function. - /// - - public static IEnumerable GroupBy( - this IEnumerable source, - Func keySelector, - Func, TResult> resultSelector, - IEqualityComparer comparer) - { - CheckNotNull(source, "source"); - CheckNotNull(keySelector, "keySelector"); - CheckNotNull(resultSelector, "resultSelector"); - - return ToLookup(source, keySelector, comparer).Select(g => resultSelector(g.Key, g)); - } - - /// - /// Groups the elements of a sequence according to a specified key - /// selector function and creates a result value from each group and - /// its key. The keys are compared by using a specified comparer. - /// - - public static IEnumerable GroupBy( - this IEnumerable source, - Func keySelector, - Func elementSelector, - Func, TResult> resultSelector) - { - return GroupBy(source, keySelector, elementSelector, resultSelector, /* comparer */ null); - } - - /// - /// Groups the elements of a sequence according to a specified key - /// selector function and creates a result value from each group and - /// its key. Key values are compared by using a specified comparer, - /// and the elements of each group are projected by using a - /// specified function. - /// - - public static IEnumerable GroupBy( - this IEnumerable source, - Func keySelector, - Func elementSelector, - Func, TResult> resultSelector, - IEqualityComparer comparer) - { - CheckNotNull(source, "source"); - CheckNotNull(keySelector, "keySelector"); - CheckNotNull(elementSelector, "elementSelector"); - CheckNotNull(resultSelector, "resultSelector"); - - return ToLookup(source, keySelector, elementSelector, comparer) - .Select(g => resultSelector(g.Key, g)); - } - - /// - /// Applies an accumulator function over a sequence. - /// - - public static TSource Aggregate( - this IEnumerable source, - Func func) - { - CheckNotNull(source, "source"); - CheckNotNull(func, "func"); - - using (var e = source.GetEnumerator()) - { - if (!e.MoveNext()) - throw new InvalidOperationException(); - - return e.Renumerable().Skip(1).Aggregate(e.Current, func); - } - } - - /// - /// Applies an accumulator function over a sequence. The specified - /// seed value is used as the initial accumulator value. - /// - - public static TAccumulate Aggregate( - this IEnumerable source, - TAccumulate seed, - Func func) - { - return Aggregate(source, seed, func, r => r); - } - - /// - /// Applies an accumulator function over a sequence. The specified - /// seed value is used as the initial accumulator value, and the - /// specified function is used to select the result value. - /// - - public static TResult Aggregate( - this IEnumerable source, - TAccumulate seed, - Func func, - Func resultSelector) - { - CheckNotNull(source, "source"); - CheckNotNull(func, "func"); - CheckNotNull(resultSelector, "resultSelector"); - - var result = seed; - - foreach (var item in source) - result = func(result, item); - - return resultSelector(result); - } - - /// - /// Produces the set union of two sequences by using the default - /// equality comparer. - /// - - public static IEnumerable Union( - this IEnumerable first, - IEnumerable second) - { - return Union(first, second, /* comparer */ null); - } - - /// - /// Produces the set union of two sequences by using a specified - /// . - /// - - public static IEnumerable Union( - this IEnumerable first, - IEnumerable second, - IEqualityComparer comparer) - { - return first.Concat(second).Distinct(comparer); - } - - /// - /// Returns the elements of the specified sequence or the type - /// parameter's default value in a singleton collection if the - /// sequence is empty. - /// - - public static IEnumerable DefaultIfEmpty( - this IEnumerable source) - { - return source.DefaultIfEmpty(default(TSource)); - } - - /// - /// Returns the elements of the specified sequence or the specified - /// value in a singleton collection if the sequence is empty. - /// - - public static IEnumerable DefaultIfEmpty( - this IEnumerable source, - TSource defaultValue) - { - CheckNotNull(source, "source"); - - return DefaultIfEmptyYield(source, defaultValue); - } - - private static IEnumerable DefaultIfEmptyYield( - IEnumerable source, - TSource defaultValue) - { - using (var e = source.GetEnumerator()) - { - if (!e.MoveNext()) - yield return defaultValue; - else - do { yield return e.Current; } while (e.MoveNext()); - } - } - - /// - /// Determines whether all elements of a sequence satisfy a condition. - /// - - public static bool All( - this IEnumerable source, - Func predicate) - { - CheckNotNull(source, "source"); - CheckNotNull(predicate, "predicate"); - - foreach (var item in source) - if (!predicate(item)) - return false; - - return true; - } - - /// - /// Determines whether a sequence contains any elements. - /// - - public static bool Any( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - using (var e = source.GetEnumerator()) - return e.MoveNext(); - } - - /// - /// Determines whether any element of a sequence satisfies a - /// condition. - /// - - public static bool Any( - this IEnumerable source, - Func predicate) - { - return source.Where(predicate).Any(); - } - - /// - /// Determines whether a sequence contains a specified element by - /// using the default equality comparer. - /// - - public static bool Contains( - this IEnumerable source, - TSource value) - { - return source.Contains(value, /* comparer */ null); - } - - /// - /// Determines whether a sequence contains a specified element by - /// using a specified . - /// - - public static bool Contains( - this IEnumerable source, - TSource value, - IEqualityComparer comparer) - { - CheckNotNull(source, "source"); - - if (comparer == null) - { - var collection = source as ICollection; - if (collection != null) - return collection.Contains(value); - } - - comparer = comparer ?? EqualityComparer.Default; - return source.Any(item => comparer.Equals(item, value)); - } - - /// - /// Determines whether two sequences are equal by comparing the - /// elements by using the default equality comparer for their type. - /// - - public static bool SequenceEqual( - this IEnumerable first, - IEnumerable second) - { - return first.SequenceEqual(second, /* comparer */ null); - } - - /// - /// Determines whether two sequences are equal by comparing their - /// elements by using a specified . - /// - - public static bool SequenceEqual( - this IEnumerable first, - IEnumerable second, - IEqualityComparer comparer) - { - CheckNotNull(first, "frist"); - CheckNotNull(second, "second"); - - comparer = comparer ?? EqualityComparer.Default; - - using (IEnumerator lhs = first.GetEnumerator(), - rhs = second.GetEnumerator()) - { - do - { - if (!lhs.MoveNext()) - return !rhs.MoveNext(); - - if (!rhs.MoveNext()) - return false; - } - while (comparer.Equals(lhs.Current, rhs.Current)); - } - - return false; - } - - /// - /// Base implementation for Min/Max operator. - /// - - private static TSource MinMaxImpl( - this IEnumerable source, - Func lesser) - { - CheckNotNull(source, "source"); - Debug.Assert(lesser != null); - - return source.Aggregate((a, item) => lesser(a, item) ? a : item); - } - - /// - /// Base implementation for Min/Max operator for nullable types. - /// - - private static TSource? MinMaxImpl( - this IEnumerable source, - TSource? seed, Func lesser) where TSource : struct - { - CheckNotNull(source, "source"); - Debug.Assert(lesser != null); - - return source.Aggregate(seed, (a, item) => lesser(a, item) ? a : item); - // == MinMaxImpl(Repeat(null, 1).Concat(source), lesser); - } - - /// - /// Returns the minimum value in a generic sequence. - /// - - public static TSource Min( - this IEnumerable source) - { - var comparer = Comparer.Default; - return source.MinMaxImpl((x, y) => comparer.Compare(x, y) < 0); - } - - /// - /// Invokes a transform function on each element of a generic - /// sequence and returns the minimum resulting value. - /// - - public static TResult Min( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Min(); - } - - /// - /// Returns the maximum value in a generic sequence. - /// - - public static TSource Max( - this IEnumerable source) - { - var comparer = Comparer.Default; - return source.MinMaxImpl((x, y) => comparer.Compare(x, y) > 0); - } - - /// - /// Invokes a transform function on each element of a generic - /// sequence and returns the maximum resulting value. - /// - - public static TResult Max( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Max(); - } - - /// - /// Makes an enumerator seen as enumerable once more. - /// - /// - /// The supplied enumerator must have been started. The first element - /// returned is the element the enumerator was on when passed in. - /// DO NOT use this method if the caller must be a generator. It is - /// mostly safe among aggregate operations. - /// - - private static IEnumerable Renumerable(this IEnumerator e) - { - Debug.Assert(e != null); - - do { yield return e.Current; } while (e.MoveNext()); - } - - /// - /// Sorts the elements of a sequence in ascending order according to a key. - /// - - public static IOrderedEnumerable OrderBy( - this IEnumerable source, - Func keySelector) - { - return source.OrderBy(keySelector, /* comparer */ null); - } - - /// - /// Sorts the elements of a sequence in ascending order by using a - /// specified comparer. - /// - - public static IOrderedEnumerable OrderBy( - this IEnumerable source, - Func keySelector, - IComparer comparer) - { - CheckNotNull(source, "source"); - CheckNotNull(keySelector, "keySelector"); - - return new OrderedEnumerable(source, keySelector, comparer, /* descending */ false); - } - - /// - /// Sorts the elements of a sequence in descending order according to a key. - /// - - public static IOrderedEnumerable OrderByDescending( - this IEnumerable source, - Func keySelector) - { - return source.OrderByDescending(keySelector, /* comparer */ null); - } - - /// - /// Sorts the elements of a sequence in descending order by using a - /// specified comparer. - /// - - public static IOrderedEnumerable OrderByDescending( - this IEnumerable source, - Func keySelector, - IComparer comparer) - { - CheckNotNull(source, "source"); - CheckNotNull(source, "keySelector"); - - return new OrderedEnumerable(source, keySelector, comparer, /* descending */ true); - } - - /// - /// Performs a subsequent ordering of the elements in a sequence in - /// ascending order according to a key. - /// - - public static IOrderedEnumerable ThenBy( - this IOrderedEnumerable source, - Func keySelector) - { - return source.ThenBy(keySelector, /* comparer */ null); - } - - /// - /// Performs a subsequent ordering of the elements in a sequence in - /// ascending order by using a specified comparer. - /// - - public static IOrderedEnumerable ThenBy( - this IOrderedEnumerable source, - Func keySelector, - IComparer comparer) - { - CheckNotNull(source, "source"); - - return source.CreateOrderedEnumerable(keySelector, comparer, /* descending */ false); - } - - /// - /// Performs a subsequent ordering of the elements in a sequence in - /// descending order, according to a key. - /// - - public static IOrderedEnumerable ThenByDescending( - this IOrderedEnumerable source, - Func keySelector) - { - return source.ThenByDescending(keySelector, /* comparer */ null); - } - - /// - /// Performs a subsequent ordering of the elements in a sequence in - /// descending order by using a specified comparer. - /// - - public static IOrderedEnumerable ThenByDescending( - this IOrderedEnumerable source, - Func keySelector, - IComparer comparer) - { - CheckNotNull(source, "source"); - - return source.CreateOrderedEnumerable(keySelector, comparer, /* descending */ true); - } - - /// - /// Base implementation for Intersect and Except operators. - /// - - private static IEnumerable IntersectExceptImpl( - this IEnumerable first, - IEnumerable second, - IEqualityComparer comparer, - bool flag) - { - CheckNotNull(first, "first"); - CheckNotNull(second, "second"); - - var keys = new List(); - var flags = new Dictionary(comparer); - - foreach (var item in first.Where(k => !flags.ContainsKey(k))) - { - flags.Add(item, !flag); - keys.Add(item); - } - - foreach (var item in second.Where(flags.ContainsKey)) - flags[item] = flag; - - // - // As per docs, "the marked elements are yielded in the order in - // which they were collected. - // - - return keys.Where(item => flags[item]); - } - - /// - /// Produces the set intersection of two sequences by using the - /// default equality comparer to compare values. - /// - - public static IEnumerable Intersect( - this IEnumerable first, - IEnumerable second) - { - return first.Intersect(second, /* comparer */ null); - } - - /// - /// Produces the set intersection of two sequences by using the - /// specified to compare values. - /// - - public static IEnumerable Intersect( - this IEnumerable first, - IEnumerable second, - IEqualityComparer comparer) - { - return IntersectExceptImpl(first, second, comparer, /* flag */ true); - } - - /// - /// Produces the set difference of two sequences by using the - /// default equality comparer to compare values. - /// - - public static IEnumerable Except( - this IEnumerable first, - IEnumerable second) - { - return first.Except(second, /* comparer */ null); - } - - /// - /// Produces the set difference of two sequences by using the - /// specified to compare values. - /// - - public static IEnumerable Except( - this IEnumerable first, - IEnumerable second, - IEqualityComparer comparer) - { - return IntersectExceptImpl(first, second, comparer, /* flag */ false); - } - - /// - /// Creates a from an - /// according to a specified key - /// selector function. - /// - - public static Dictionary ToDictionary( - this IEnumerable source, - Func keySelector) - { - return source.ToDictionary(keySelector, /* comparer */ null); - } - - /// - /// Creates a from an - /// according to a specified key - /// selector function and key comparer. - /// - - public static Dictionary ToDictionary( - this IEnumerable source, - Func keySelector, - IEqualityComparer comparer) - { - return source.ToDictionary(keySelector, e => e); - } - - /// - /// Creates a from an - /// according to specified key - /// selector and element selector functions. - /// - - public static Dictionary ToDictionary( - this IEnumerable source, - Func keySelector, - Func elementSelector) - { - return source.ToDictionary(keySelector, elementSelector, /* comparer */ null); - } - - /// - /// Creates a from an - /// according to a specified key - /// selector function, a comparer, and an element selector function. - /// - - public static Dictionary ToDictionary( - this IEnumerable source, - Func keySelector, - Func elementSelector, - IEqualityComparer comparer) - { - CheckNotNull(source, "source"); - CheckNotNull(keySelector, "keySelector"); - CheckNotNull(elementSelector, "elementSelector"); - - var dict = new Dictionary(comparer); - - foreach (var item in source) - { - // - // ToDictionary is meant to throw ArgumentNullException if - // keySelector produces a key that is null and - // Argument exception if keySelector produces duplicate keys - // for two elements. Incidentally, the doucmentation for - // IDictionary.Add says that the Add method - // throws the same exceptions under the same circumstances - // so we don't need to do any additional checking or work - // here and let the Add implementation do all the heavy - // lifting. - // - - dict.Add(keySelector(item), elementSelector(item)); - } - - return dict; - } - - /// - /// Correlates the elements of two sequences based on matching keys. - /// The default equality comparer is used to compare keys. - /// - - public static IEnumerable Join( - this IEnumerable outer, - IEnumerable inner, - Func outerKeySelector, - Func innerKeySelector, - Func resultSelector) - { - return outer.Join(inner, outerKeySelector, innerKeySelector, resultSelector, /* comparer */ null); - } - - /// - /// Correlates the elements of two sequences based on matching keys. - /// The default equality comparer is used to compare keys. A - /// specified is used to compare keys. - /// - - public static IEnumerable Join( - this IEnumerable outer, - IEnumerable inner, - Func outerKeySelector, - Func innerKeySelector, - Func resultSelector, - IEqualityComparer comparer) - { - CheckNotNull(outer, "outer"); - CheckNotNull(inner, "inner"); - CheckNotNull(outerKeySelector, "outerKeySelector"); - CheckNotNull(innerKeySelector, "innerKeySelector"); - CheckNotNull(resultSelector, "resultSelector"); - - var lookup = inner.ToLookup(innerKeySelector, comparer); - - return - from o in outer - from i in lookup[outerKeySelector(o)] - select resultSelector(o, i); - } - - /// - /// Correlates the elements of two sequences based on equality of - /// keys and groups the results. The default equality comparer is - /// used to compare keys. - /// - - public static IEnumerable GroupJoin( - this IEnumerable outer, - IEnumerable inner, - Func outerKeySelector, - Func innerKeySelector, - Func, TResult> resultSelector) - { - return outer.GroupJoin(inner, outerKeySelector, innerKeySelector, resultSelector, /* comparer */ null); - } - - /// - /// Correlates the elements of two sequences based on equality of - /// keys and groups the results. The default equality comparer is - /// used to compare keys. A specified - /// is used to compare keys. - /// - - public static IEnumerable GroupJoin( - this IEnumerable outer, - IEnumerable inner, - Func outerKeySelector, - Func innerKeySelector, - Func, TResult> resultSelector, - IEqualityComparer comparer) - { - CheckNotNull(outer, "outer"); - CheckNotNull(inner, "inner"); - CheckNotNull(outerKeySelector, "outerKeySelector"); - CheckNotNull(innerKeySelector, "innerKeySelector"); - CheckNotNull(resultSelector, "resultSelector"); - - var lookup = inner.ToLookup(innerKeySelector, comparer); - return outer.Select(o => resultSelector(o, lookup[outerKeySelector(o)])); - } - - [DebuggerStepThrough] - private static void CheckNotNull(T value, string name) where T : class - { - if (value == null) - throw new ArgumentNullException(name); - } - - private static class Sequence - { - public static readonly IEnumerable Empty = new T[0]; - } - - private sealed class Grouping : List, IGrouping - { - internal Grouping(K key) - { - Key = key; - } - - public K Key { get; private set; } - } - } -} - -// $Id: Enumerable.g.cs 215 2009-10-03 13:31:49Z azizatif $ - -namespace System.Linq -{ - #region Imports - - using System; - using System.Collections.Generic; - - #endregion - - // This partial implementation was template-generated: - // Sat, 03 Oct 2009 09:42:39 GMT - - partial class Enumerable - { - /// - /// Computes the sum of a sequence of nullable values. - /// - - public static int Sum( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - int sum = 0; - foreach (var num in source) - sum = checked(sum + num); - - return sum; - } - - /// - /// Computes the sum of a sequence of nullable - /// values that are obtained by invoking a transform function on - /// each element of the input sequence. - /// - - public static int Sum( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Sum(); - } - - /// - /// Computes the average of a sequence of nullable values. - /// - - public static double Average( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - long sum = 0; - long count = 0; - - foreach (var num in source) - checked - { - sum += (int)num; - count++; - } - - if (count == 0) - throw new InvalidOperationException(); - - return (double)sum / count; - } - - /// - /// Computes the average of a sequence of nullable values - /// that are obtained by invoking a transform function on each - /// element of the input sequence. - /// - - public static double Average( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Average(); - } - - - /// - /// Computes the sum of a sequence of values. - /// - - public static int? Sum( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - int sum = 0; - foreach (var num in source) - sum = checked(sum + (num ?? 0)); - - return sum; - } - - /// - /// Computes the sum of a sequence of - /// values that are obtained by invoking a transform function on - /// each element of the input sequence. - /// - - public static int? Sum( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Sum(); - } - - /// - /// Computes the average of a sequence of values. - /// - - public static double? Average( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - long sum = 0; - long count = 0; - - foreach (var num in source.Where(n => n != null)) - checked - { - sum += (int)num; - count++; - } - - if (count == 0) - return null; - - return (double?)sum / count; - } - - /// - /// Computes the average of a sequence of values - /// that are obtained by invoking a transform function on each - /// element of the input sequence. - /// - - public static double? Average( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Average(); - } - - /// - /// Returns the minimum value in a sequence of nullable - /// values. - /// - - public static int? Min( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - return MinMaxImpl(source.Where(x => x != null), null, (min, x) => min < x); - } - - /// - /// Invokes a transform function on each element of a sequence and - /// returns the minimum nullable value. - /// - - public static int? Min( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Min(); - } - - /// - /// Returns the maximum value in a sequence of nullable - /// values. - /// - - public static int? Max( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - return MinMaxImpl(source.Where(x => x != null), - null, (max, x) => x == null || (max != null && x.Value < max.Value)); - } - - /// - /// Invokes a transform function on each element of a sequence and - /// returns the maximum nullable value. - /// - - public static int? Max( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Max(); - } - - /// - /// Computes the sum of a sequence of nullable values. - /// - - public static long Sum( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - long sum = 0; - foreach (var num in source) - sum = checked(sum + num); - - return sum; - } - - /// - /// Computes the sum of a sequence of nullable - /// values that are obtained by invoking a transform function on - /// each element of the input sequence. - /// - - public static long Sum( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Sum(); - } - - /// - /// Computes the average of a sequence of nullable values. - /// - - public static double Average( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - long sum = 0; - long count = 0; - - foreach (var num in source) - checked - { - sum += (long)num; - count++; - } - - if (count == 0) - throw new InvalidOperationException(); - - return (double)sum / count; - } - - /// - /// Computes the average of a sequence of nullable values - /// that are obtained by invoking a transform function on each - /// element of the input sequence. - /// - - public static double Average( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Average(); - } - - - /// - /// Computes the sum of a sequence of values. - /// - - public static long? Sum( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - long sum = 0; - foreach (var num in source) - sum = checked(sum + (num ?? 0)); - - return sum; - } - - /// - /// Computes the sum of a sequence of - /// values that are obtained by invoking a transform function on - /// each element of the input sequence. - /// - - public static long? Sum( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Sum(); - } - - /// - /// Computes the average of a sequence of values. - /// - - public static double? Average( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - long sum = 0; - long count = 0; - - foreach (var num in source.Where(n => n != null)) - checked - { - sum += (long)num; - count++; - } - - if (count == 0) - return null; - - return (double?)sum / count; - } - - /// - /// Computes the average of a sequence of values - /// that are obtained by invoking a transform function on each - /// element of the input sequence. - /// - - public static double? Average( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Average(); - } - - /// - /// Returns the minimum value in a sequence of nullable - /// values. - /// - - public static long? Min( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - return MinMaxImpl(source.Where(x => x != null), null, (min, x) => min < x); - } - - /// - /// Invokes a transform function on each element of a sequence and - /// returns the minimum nullable value. - /// - - public static long? Min( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Min(); - } - - /// - /// Returns the maximum value in a sequence of nullable - /// values. - /// - - public static long? Max( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - return MinMaxImpl(source.Where(x => x != null), - null, (max, x) => x == null || (max != null && x.Value < max.Value)); - } - - /// - /// Invokes a transform function on each element of a sequence and - /// returns the maximum nullable value. - /// - - public static long? Max( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Max(); - } - - /// - /// Computes the sum of a sequence of nullable values. - /// - - public static float Sum( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - float sum = 0; - foreach (var num in source) - sum = checked(sum + num); - - return sum; - } - - /// - /// Computes the sum of a sequence of nullable - /// values that are obtained by invoking a transform function on - /// each element of the input sequence. - /// - - public static float Sum( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Sum(); - } - - /// - /// Computes the average of a sequence of nullable values. - /// - - public static float Average( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - float sum = 0; - long count = 0; - - foreach (var num in source) - checked - { - sum += (float)num; - count++; - } - - if (count == 0) - throw new InvalidOperationException(); - - return (float)sum / count; - } - - /// - /// Computes the average of a sequence of nullable values - /// that are obtained by invoking a transform function on each - /// element of the input sequence. - /// - - public static float Average( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Average(); - } - - - /// - /// Computes the sum of a sequence of values. - /// - - public static float? Sum( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - float sum = 0; - foreach (var num in source) - sum = checked(sum + (num ?? 0)); - - return sum; - } - - /// - /// Computes the sum of a sequence of - /// values that are obtained by invoking a transform function on - /// each element of the input sequence. - /// - - public static float? Sum( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Sum(); - } - - /// - /// Computes the average of a sequence of values. - /// - - public static float? Average( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - float sum = 0; - long count = 0; - - foreach (var num in source.Where(n => n != null)) - checked - { - sum += (float)num; - count++; - } - - if (count == 0) - return null; - - return (float?)sum / count; - } - - /// - /// Computes the average of a sequence of values - /// that are obtained by invoking a transform function on each - /// element of the input sequence. - /// - - public static float? Average( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Average(); - } - - /// - /// Returns the minimum value in a sequence of nullable - /// values. - /// - - public static float? Min( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - return MinMaxImpl(source.Where(x => x != null), null, (min, x) => min < x); - } - - /// - /// Invokes a transform function on each element of a sequence and - /// returns the minimum nullable value. - /// - - public static float? Min( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Min(); - } - - /// - /// Returns the maximum value in a sequence of nullable - /// values. - /// - - public static float? Max( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - return MinMaxImpl(source.Where(x => x != null), - null, (max, x) => x == null || (max != null && x.Value < max.Value)); - } - - /// - /// Invokes a transform function on each element of a sequence and - /// returns the maximum nullable value. - /// - - public static float? Max( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Max(); - } - - /// - /// Computes the sum of a sequence of nullable values. - /// - - public static double Sum( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - double sum = 0; - foreach (var num in source) - sum = checked(sum + num); - - return sum; - } - - /// - /// Computes the sum of a sequence of nullable - /// values that are obtained by invoking a transform function on - /// each element of the input sequence. - /// - - public static double Sum( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Sum(); - } - - /// - /// Computes the average of a sequence of nullable values. - /// - - public static double Average( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - double sum = 0; - long count = 0; - - foreach (var num in source) - checked - { - sum += (double)num; - count++; - } - - if (count == 0) - throw new InvalidOperationException(); - - return (double)sum / count; - } - - /// - /// Computes the average of a sequence of nullable values - /// that are obtained by invoking a transform function on each - /// element of the input sequence. - /// - - public static double Average( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Average(); - } - - - /// - /// Computes the sum of a sequence of values. - /// - - public static double? Sum( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - double sum = 0; - foreach (var num in source) - sum = checked(sum + (num ?? 0)); - - return sum; - } - - /// - /// Computes the sum of a sequence of - /// values that are obtained by invoking a transform function on - /// each element of the input sequence. - /// - - public static double? Sum( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Sum(); - } - - /// - /// Computes the average of a sequence of values. - /// - - public static double? Average( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - double sum = 0; - long count = 0; - - foreach (var num in source.Where(n => n != null)) - checked - { - sum += (double)num; - count++; - } - - if (count == 0) - return null; - - return (double?)sum / count; - } - - /// - /// Computes the average of a sequence of values - /// that are obtained by invoking a transform function on each - /// element of the input sequence. - /// - - public static double? Average( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Average(); - } - - /// - /// Returns the minimum value in a sequence of nullable - /// values. - /// - - public static double? Min( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - return MinMaxImpl(source.Where(x => x != null), null, (min, x) => min < x); - } - - /// - /// Invokes a transform function on each element of a sequence and - /// returns the minimum nullable value. - /// - - public static double? Min( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Min(); - } - - /// - /// Returns the maximum value in a sequence of nullable - /// values. - /// - - public static double? Max( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - return MinMaxImpl(source.Where(x => x != null), - null, (max, x) => x == null || (max != null && x.Value < max.Value)); - } - - /// - /// Invokes a transform function on each element of a sequence and - /// returns the maximum nullable value. - /// - - public static double? Max( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Max(); - } - - /// - /// Computes the sum of a sequence of nullable values. - /// - - public static decimal Sum( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - decimal sum = 0; - foreach (var num in source) - sum = checked(sum + num); - - return sum; - } - - /// - /// Computes the sum of a sequence of nullable - /// values that are obtained by invoking a transform function on - /// each element of the input sequence. - /// - - public static decimal Sum( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Sum(); - } - - /// - /// Computes the average of a sequence of nullable values. - /// - - public static decimal Average( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - decimal sum = 0; - long count = 0; - - foreach (var num in source) - checked - { - sum += (decimal)num; - count++; - } - - if (count == 0) - throw new InvalidOperationException(); - - return (decimal)sum / count; - } - - /// - /// Computes the average of a sequence of nullable values - /// that are obtained by invoking a transform function on each - /// element of the input sequence. - /// - - public static decimal Average( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Average(); - } - - - /// - /// Computes the sum of a sequence of values. - /// - - public static decimal? Sum( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - decimal sum = 0; - foreach (var num in source) - sum = checked(sum + (num ?? 0)); - - return sum; - } - - /// - /// Computes the sum of a sequence of - /// values that are obtained by invoking a transform function on - /// each element of the input sequence. - /// - - public static decimal? Sum( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Sum(); - } - - /// - /// Computes the average of a sequence of values. - /// - - public static decimal? Average( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - decimal sum = 0; - long count = 0; - - foreach (var num in source.Where(n => n != null)) - checked - { - sum += (decimal)num; - count++; - } - - if (count == 0) - return null; - - return (decimal?)sum / count; - } - - /// - /// Computes the average of a sequence of values - /// that are obtained by invoking a transform function on each - /// element of the input sequence. - /// - - public static decimal? Average( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Average(); - } - - /// - /// Returns the minimum value in a sequence of nullable - /// values. - /// - - public static decimal? Min( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - return MinMaxImpl(source.Where(x => x != null), null, (min, x) => min < x); - } - - /// - /// Invokes a transform function on each element of a sequence and - /// returns the minimum nullable value. - /// - - public static decimal? Min( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Min(); - } - - /// - /// Returns the maximum value in a sequence of nullable - /// values. - /// - - public static decimal? Max( - this IEnumerable source) - { - CheckNotNull(source, "source"); - - return MinMaxImpl(source.Where(x => x != null), - null, (max, x) => x == null || (max != null && x.Value < max.Value)); - } - - /// - /// Invokes a transform function on each element of a sequence and - /// returns the maximum nullable value. - /// - - public static decimal? Max( - this IEnumerable source, - Func selector) - { - return source.Select(selector).Max(); - } - } -} - -namespace System.Runtime.CompilerServices -{ - /// - /// This attribute allows us to define extension methods without - /// requiring .NET Framework 3.5. For more information, see the section, - /// Extension Methods in .NET Framework 2.0 Apps, - /// of Basic Instincts: Extension Methods - /// column in MSDN Magazine, - /// issue Nov 2007. - /// - - [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly)] - internal sealed class ExtensionAttribute : Attribute { } -} - -// $Id: Func.cs 224 2009-10-04 07:13:08Z azizatif $ - -namespace System -{ -#if LINQBRIDGE_LIB - public delegate TResult Func(); - public delegate TResult Func(T a); - public delegate TResult Func(T1 arg1, T2 arg2); - public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3); - public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4); -#else - delegate TResult Func(); - delegate TResult Func(T a); - delegate TResult Func(T1 arg1, T2 arg2); - delegate TResult Func(T1 arg1, T2 arg2, T3 arg3); - delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4); -#endif -} - -// $Id: IGrouping.cs 225 2009-10-04 07:16:14Z azizatif $ - -namespace System.Linq -{ - #region Imports - - using System.Collections.Generic; - - #endregion - - /// - /// Represents a collection of objects that have a common key. - /// - - partial interface IGrouping : IEnumerable - { - /// - /// Gets the key of the . - /// - - TKey Key { get; } - } -} - -// $Id: ILookup.cs 224 2009-10-04 07:13:08Z azizatif $ - -namespace System.Linq -{ - using System.Collections.Generic; - - /// - /// Defines an indexer, size property, and Boolean search method for - /// data structures that map keys to - /// sequences of values. - /// - - partial interface ILookup : IEnumerable> - { - bool Contains(TKey key); - int Count { get; } - IEnumerable this[TKey key] { get; } - } -} - -// $Id: IOrderedEnumerable.cs 224 2009-10-04 07:13:08Z azizatif $ - -namespace System.Linq -{ - using System.Collections.Generic; - - /// - /// Represents a sorted sequence. - /// - - partial interface IOrderedEnumerable : IEnumerable - { - /// - /// Performs a subsequent ordering on the elements of an - /// according to a key. - /// - - IOrderedEnumerable CreateOrderedEnumerable( - Func keySelector, IComparer comparer, bool descending); - } -} - -// $Id: Lookup.cs 224 2009-10-04 07:13:08Z azizatif $ - -namespace System.Linq -{ - #region Imports - - using System; - using System.Collections; - using System.Collections.Generic; - using IEnumerable = System.Collections.IEnumerable; - - #endregion - - /// - /// Represents a collection of keys each mapped to one or more values. - /// - - internal sealed class Lookup : ILookup - { - private readonly Dictionary> _map; - - internal Lookup(IEqualityComparer comparer) - { - _map = new Dictionary>(comparer); - } - - internal void Add(IGrouping item) - { - _map.Add(item.Key, item); - } - - internal IEnumerable Find(TKey key) - { - IGrouping grouping; - return _map.TryGetValue(key, out grouping) ? grouping : null; - } - - /// - /// Gets the number of key/value collection pairs in the . - /// - - public int Count - { - get { return _map.Count; } - } - - /// - /// Gets the collection of values indexed by the specified key. - /// - - public IEnumerable this[TKey key] - { - get - { - IGrouping result; - return _map.TryGetValue(key, out result) ? result : Enumerable.Empty(); - } - } - - /// - /// Determines whether a specified key is in the . - /// - - public bool Contains(TKey key) - { - return _map.ContainsKey(key); - } - - /// - /// Applies a transform function to each key and its associated - /// values and returns the results. - /// - - public IEnumerable ApplyResultSelector( - Func, TResult> resultSelector) - { - if (resultSelector == null) - throw new ArgumentNullException("resultSelector"); - - foreach (var pair in _map) - yield return resultSelector(pair.Key, pair.Value); - } - - /// - /// Returns a generic enumerator that iterates through the . - /// - - public IEnumerator> GetEnumerator() - { - return _map.Values.GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } -} - -// $Id: OrderedEnumerable.cs 237 2010-01-31 12:20:24Z azizatif $ - -namespace LinqBridge -{ - #region Imports - - using System; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - #endregion - - internal sealed class OrderedEnumerable : IOrderedEnumerable - { - private readonly IEnumerable _source; - private readonly List> _comparisons; - - public OrderedEnumerable(IEnumerable source, - Func keySelector, IComparer comparer, bool descending) : - this(source, null, keySelector, comparer, descending) { } - - private OrderedEnumerable(IEnumerable source, List> comparisons, - Func keySelector, IComparer comparer, bool descending) - { - if (source == null) throw new ArgumentNullException("source"); - if (keySelector == null) throw new ArgumentNullException("keySelector"); - - _source = source; - - comparer = comparer ?? Comparer.Default; - - if (comparisons == null) - comparisons = new List>(/* capacity */ 4); - - comparisons.Add((x, y) - => (descending ? -1 : 1) * comparer.Compare(keySelector(x), keySelector(y))); - - _comparisons = comparisons; - } - - public IOrderedEnumerable CreateOrderedEnumerable( - Func keySelector, IComparer comparer, bool descending) - { - return new OrderedEnumerable(_source, _comparisons, keySelector, comparer, descending); - } - - public IEnumerator GetEnumerator() - { - // - // We sort using List.Sort, but docs say that it performs an - // unstable sort. LINQ, on the other hand, says OrderBy performs - // a stable sort. So convert the source sequence into a sequence - // of tuples where the second element tags the position of the - // element from the source sequence (First). The position is - // then used as a tie breaker when all keys compare equal, - // thus making the sort stable. - // - - var list = _source.Select(new Func>(TagPosition)).ToList(); - - list.Sort((x, y) => - { - // - // Compare keys from left to right. - // - - var comparisons = _comparisons; - for (var i = 0; i < comparisons.Count; i++) - { - var result = comparisons[i](x.First, y.First); - if (result != 0) - return result; - } - - // - // All keys compared equal so now break the tie by their - // position in the original sequence, making the sort stable. - // - - return x.Second.CompareTo(y.Second); - }); - - return list.Select(new Func, T>(GetFirst)).GetEnumerator(); - - } - - /// - /// See issue #11 - /// for why this method is needed and cannot be expressed as a - /// lambda at the call site. - /// - - private static Tuple TagPosition(T e, int i) - { - return new Tuple(e, i); - } - - /// - /// See issue #11 - /// for why this method is needed and cannot be expressed as a - /// lambda at the call site. - /// - - private static T GetFirst(Tuple pv) - { - return pv.First; - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } -} - -// $Id: Tuple.cs 215 2009-10-03 13:31:49Z azizatif $ - -namespace LinqBridge -{ - #region Imports - - using System; - using System.Collections.Generic; - using System.Text; - - #endregion - - [Serializable] - internal struct Tuple : IEquatable> - { - public TFirst First { get; private set; } - public TSecond Second { get; private set; } - - public Tuple(TFirst first, TSecond second) - : this() - { - First = first; - Second = second; - } - - public override bool Equals(object obj) - { - return obj != null - && obj is Tuple - && base.Equals((Tuple)obj); - } - - public bool Equals(Tuple other) - { - return EqualityComparer.Default.Equals(other.First, First) - && EqualityComparer.Default.Equals(other.Second, Second); - } - - public override int GetHashCode() - { - var num = 0x7a2f0b42; - num = (-1521134295 * num) + EqualityComparer.Default.GetHashCode(First); - return (-1521134295 * num) + EqualityComparer.Default.GetHashCode(Second); - } - - public override string ToString() - { - return string.Format(@"{{ First = {0}, Second = {1} }}", First, Second); - } - } -} - -// $Id: Action.cs 239 2010-02-05 23:26:23Z azizatif $ - -namespace System -{ -#if LINQBRIDGE_LIB - public delegate void Action(); - public delegate void Action(T1 arg1, T2 arg2); - public delegate void Action(T1 arg1, T2 arg2, T3 arg3); - public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4); -#else - public delegate void Action(); - public delegate void Action(T1 arg1, T2 arg2); - public delegate void Action(T1 arg1, T2 arg2, T3 arg3); - public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4); -#endif -} diff --git a/RestSharp.Net2/RestSharp.Net2.csproj b/RestSharp.Net2/RestSharp.Net2.csproj index f4c771c46..4fbb0ec30 100644 --- a/RestSharp.Net2/RestSharp.Net2.csproj +++ b/RestSharp.Net2/RestSharp.Net2.csproj @@ -10,7 +10,7 @@ Properties RestSharp.Net2 RestSharp.Net2 - v2.0 + v4.8 512 @@ -19,7 +19,7 @@ full false bin\Debug\ - TRACE;DEBUG;Net2;FRAMEWORK;NET_2_0 + TRACE;DEBUG;FRAMEWORK prompt 4 @@ -27,18 +27,20 @@ pdbonly true bin\Release\ - TRACE;Net2;FRAMEWORK;NET_2_0 + TRACE;FRAMEWORK prompt 4 False - ..\packages\Newtonsoft.Json.4.5.1\lib\net20\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll + + @@ -275,42 +277,11 @@ Validation\Validate.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/RestSharp.Net2/System.Xml.Linq/Extensions.cs b/RestSharp.Net2/System.Xml.Linq/Extensions.cs deleted file mode 100644 index bf88996b0..000000000 --- a/RestSharp.Net2/System.Xml.Linq/Extensions.cs +++ /dev/null @@ -1,176 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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; -using System.Collections.Generic; -using System.Runtime.CompilerServices; - -namespace System.Xml.Linq -{ - public static class Extensions - { - public static IEnumerable Ancestors (this IEnumerable source) where T : XNode - { - foreach (T item in source) - for (XElement n = item.Parent as XElement; n != null; n = n.Parent as XElement) - yield return n; - } - - public static IEnumerable Ancestors (this IEnumerable source, XName name) where T : XNode - { - foreach (T item in source) - for (XElement n = item.Parent as XElement; n != null; n = n.Parent as XElement) - if (n.Name == name) - yield return n; - } - - public static IEnumerable AncestorsAndSelf (this IEnumerable source) - { - foreach (XElement item in source) - for (XElement n = item as XElement; n != null; n = n.Parent as XElement) - yield return n; - } - - public static IEnumerable AncestorsAndSelf (this IEnumerable source, XName name) - { - foreach (XElement item in source) - for (XElement n = item as XElement; n != null; n = n.Parent as XElement) - if (n.Name == name) - yield return n; - } - - public static IEnumerable Attributes (this IEnumerable source) - { - foreach (XElement item in source) - foreach (XAttribute attr in item.Attributes ()) - yield return attr; - } - - public static IEnumerable Attributes (this IEnumerable source, XName name) - { - foreach (XElement item in source) - foreach (XAttribute attr in item.Attributes (name)) - yield return attr; - } - - public static IEnumerable DescendantNodes ( - this IEnumerable source) where T : XContainer - { - foreach (XContainer item in source) - foreach (XNode n in item.DescendantNodes ()) - yield return n; - } - - public static IEnumerable DescendantNodesAndSelf ( - this IEnumerable source) - { - foreach (XElement item in source) - foreach (XNode n in item.DescendantNodesAndSelf ()) - yield return n; - } - - public static IEnumerable Descendants ( - this IEnumerable source) where T : XContainer - { - foreach (XContainer item in source) - foreach (XElement n in item.Descendants ()) - yield return n; - } - - public static IEnumerable Descendants ( - this IEnumerable source, XName name) where T : XContainer - { - foreach (XContainer item in source) - foreach (XElement n in item.Descendants (name)) - yield return n; - } - - public static IEnumerable DescendantsAndSelf ( - this IEnumerable source) - { - foreach (XElement item in source) - foreach (XElement n in item.DescendantsAndSelf ()) - yield return n; - } - - public static IEnumerable DescendantsAndSelf ( - this IEnumerable source, XName name) - { - foreach (XElement item in source) - foreach (XElement n in item.DescendantsAndSelf (name)) - yield return n; - } - - public static IEnumerable Elements ( - this IEnumerable source) where T : XContainer - { - foreach (XContainer item in source) - foreach (XElement n in item.Elements ()) - yield return n; - } - - public static IEnumerable Elements ( - this IEnumerable source, XName name) where T : XContainer - { - foreach (XContainer item in source) - foreach (XElement n in item.Elements (name)) - yield return n; - } - - public static IEnumerable InDocumentOrder ( - this IEnumerable source) where T : XNode - { - List list = new List (); - foreach (XNode n in source) - list.Add (n); - list.Sort (XNode.DocumentOrderComparer); - foreach (T n in list) - yield return n; - } - - public static IEnumerable Nodes ( - this IEnumerable source) where T : XContainer - { - foreach (XContainer item in source) - foreach (XNode n in item.Nodes ()) - yield return n; - } - - public static void Remove (this IEnumerable source) - { - foreach (XAttribute item in source) - item.Remove (); - } - - public static void Remove (this IEnumerable source) where T : XNode - { - var l = new List (source); - foreach (T item in l) - item.Remove (); - } - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/LoadOptions.cs b/RestSharp.Net2/System.Xml.Linq/LoadOptions.cs deleted file mode 100644 index aa07d37e5..000000000 --- a/RestSharp.Net2/System.Xml.Linq/LoadOptions.cs +++ /dev/null @@ -1,39 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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; - -namespace System.Xml.Linq -{ - [Flags] - public enum LoadOptions - { - None = 0, - PreserveWhitespace = 1, - SetBaseUri = 2, - SetLineInfo = 4, - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/ReaderOptions.cs b/RestSharp.Net2/System.Xml.Linq/ReaderOptions.cs deleted file mode 100644 index df8a61929..000000000 --- a/RestSharp.Net2/System.Xml.Linq/ReaderOptions.cs +++ /dev/null @@ -1,36 +0,0 @@ -// -// -// Copyright 2010 Novell (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 -// "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; - -namespace System.Xml.Linq -{ - [Flags] - public enum ReaderOptions - { - None = 0, - OmitDuplicateNamespaces = 1 - } -} -#endif \ No newline at end of file diff --git a/RestSharp.Net2/System.Xml.Linq/SaveOptions.cs b/RestSharp.Net2/System.Xml.Linq/SaveOptions.cs deleted file mode 100644 index f9065f65f..000000000 --- a/RestSharp.Net2/System.Xml.Linq/SaveOptions.cs +++ /dev/null @@ -1,40 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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; - -namespace System.Xml.Linq -{ - [Flags] - public enum SaveOptions - { - None = 0, - DisableFormatting = 1, -#if NET_4_0 || MOONLIGHT || MOBILE - OmitDuplicateNamespaces = 2 -#endif - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XAttribute.cs b/RestSharp.Net2/System.Xml.Linq/XAttribute.cs deleted file mode 100644 index 170dc360e..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XAttribute.cs +++ /dev/null @@ -1,363 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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.Text; -using System.Xml; - -namespace System.Xml.Linq -{ - public class XAttribute : XObject - { - static readonly XAttribute [] empty_array = new XAttribute [0]; - - public static IEnumerable EmptySequence { - get { return empty_array; } - } - - XName name; - string value; - XAttribute next; - XAttribute previous; - - public XAttribute (XAttribute other) - { - if (other == null) - throw new ArgumentNullException ("other"); - name = other.name; - value = other.value; - } - - public XAttribute (XName name, object value) - { - if (name == null) - throw new ArgumentNullException ("name"); - this.name = name; - SetValue (value); - } - - [CLSCompliant (false)] - public static explicit operator bool (XAttribute attribute) - { - if (attribute == null) - throw new ArgumentNullException ("attribute"); - return XUtil.ConvertToBoolean (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator bool? (XAttribute attribute) - { - if (attribute == null) - return null; - - return attribute.value == null ? (bool?) null : XUtil.ConvertToBoolean (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator DateTime (XAttribute attribute) - { - if (attribute == null) - throw new ArgumentNullException ("attribute"); - return XUtil.ToDateTime (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator DateTime? (XAttribute attribute) - { - if (attribute == null) - return null; - - return attribute.value == null ? (DateTime?) null : XUtil.ToDateTime (attribute.value); - } - -#if !TARGET_JVM // Same as for System.Xml.XmlConvert.ToDateTimeOffset - - [CLSCompliant (false)] - public static explicit operator DateTimeOffset (XAttribute attribute) - { - if (attribute == null) - throw new ArgumentNullException ("attribute"); - return XmlConvert.ToDateTimeOffset (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator DateTimeOffset? (XAttribute attribute) - { - if (attribute == null) - return null; - - return attribute.value == null ? (DateTimeOffset?) null : XmlConvert.ToDateTimeOffset (attribute.value); - } - -#endif - - [CLSCompliant (false)] - public static explicit operator decimal (XAttribute attribute) - { - if (attribute == null) - throw new ArgumentNullException ("attribute"); - return XmlConvert.ToDecimal (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator decimal? (XAttribute attribute) - { - if (attribute == null) - return null; - - return attribute.value == null ? (decimal?) null : XmlConvert.ToDecimal (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator double (XAttribute attribute) - { - if (attribute == null) - throw new ArgumentNullException ("attribute"); - return XmlConvert.ToDouble (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator double? (XAttribute attribute) - { - if (attribute == null) - return null; - - return attribute.value == null ? (double?) null : XmlConvert.ToDouble (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator float (XAttribute attribute) - { - if (attribute == null) - throw new ArgumentNullException ("attribute"); - return XmlConvert.ToSingle (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator float? (XAttribute attribute) - { - if (attribute == null) - return null; - - return attribute.value == null ? (float?) null : XmlConvert.ToSingle (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator Guid (XAttribute attribute) - { - if (attribute == null) - throw new ArgumentNullException ("attribute"); - return XmlConvert.ToGuid (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator Guid? (XAttribute attribute) - { - if (attribute == null) - return null; - - return attribute.value == null ? (Guid?) null : XmlConvert.ToGuid (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator int (XAttribute attribute) - { - if (attribute == null) - throw new ArgumentNullException ("attribute"); - return XmlConvert.ToInt32 (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator int? (XAttribute attribute) - { - if (attribute == null) - return null; - - return attribute.value == null ? (int?) null : XmlConvert.ToInt32 (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator long (XAttribute attribute) - { - if (attribute == null) - throw new ArgumentNullException ("attribute"); - return XmlConvert.ToInt64 (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator long? (XAttribute attribute) - { - if (attribute == null) - return null; - - return attribute.value == null ? (long?) null : XmlConvert.ToInt64 (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator uint (XAttribute attribute) - { - if (attribute == null) - throw new ArgumentNullException ("attribute"); - return XmlConvert.ToUInt32 (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator uint? (XAttribute attribute) - { - if (attribute == null) - return null; - - return attribute.value == null ? (uint?) null : XmlConvert.ToUInt32 (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator ulong (XAttribute attribute) - { - if (attribute == null) - throw new ArgumentNullException ("attribute"); - return XmlConvert.ToUInt64 (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator ulong? (XAttribute attribute) - { - if (attribute == null) - return null; - - return attribute.value == null ? (ulong?) null : XmlConvert.ToUInt64 (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator TimeSpan (XAttribute attribute) - { - if (attribute == null) - throw new ArgumentNullException ("attribute"); - return XmlConvert.ToTimeSpan (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator TimeSpan? (XAttribute attribute) - { - if (attribute == null) - return null; - - return attribute.value == null ? (TimeSpan?) null : XmlConvert.ToTimeSpan (attribute.value); - } - - [CLSCompliant (false)] - public static explicit operator string (XAttribute attribute) - { - if (attribute == null) - return null; - - return attribute.value; - } - - public bool IsNamespaceDeclaration { - get { return name.Namespace == XNamespace.Xmlns || (name.LocalName == "xmlns" && name.Namespace == XNamespace.None); } - } - - public XName Name { - get { return name; } - } - - public XAttribute NextAttribute { - get { return next; } - internal set { next = value; } - } - - public override XmlNodeType NodeType { - get { return XmlNodeType.Attribute; } - } - - public XAttribute PreviousAttribute { - get { return previous; } - internal set { previous = value; } - } - - public string Value { - get { return XUtil.ToString (value); } - set { this.value = value; } - } - - public void Remove () - { - if (Parent != null) { - if (next != null) - next.previous = previous; - if (previous != null) - previous.next = next; - if (Parent.FirstAttribute == this) - Parent.FirstAttribute = next; - if (Parent.LastAttribute == this) - Parent.LastAttribute = previous; - SetOwner (null); - } - next = null; - previous = null; - } - - public void SetValue (object value) - { - if (value == null) - throw new ArgumentNullException ("value"); - this.value = XUtil.ToString (value); - } - - static readonly char [] escapeChars = new char [] {'<', '>', '&', '"', '\r', '\n', '\t'}; - - public override string ToString () - { - StringBuilder sb = new StringBuilder (); - sb.Append (name.ToString ()); - sb.Append ("=\""); - int start = 0; - do { - int idx = value.IndexOfAny (escapeChars, start); - if (idx < 0) { - if (start > 0) - sb.Append (value, start, value.Length - start); - else - sb.Append (value); - sb.Append ("\""); - return sb.ToString (); - } - sb.Append (value, start, idx - start); - switch (value [idx]) { - case '&': sb.Append ("&"); break; - case '<': sb.Append ("<"); break; - case '>': sb.Append (">"); break; - case '"': sb.Append ("""); break; - case '\r': sb.Append (" "); break; - case '\n': sb.Append (" "); break; - case '\t': sb.Append (" "); break; - } - start = idx + 1; - } while (true); - } - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XCData.cs b/RestSharp.Net2/System.Xml.Linq/XCData.cs deleted file mode 100644 index 74893003e..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XCData.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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; -using System.Collections.Generic; -using System.IO; -using System.Text; -using System.Xml; - -namespace System.Xml.Linq -{ - public class XCData : XText - { - public XCData (string value) - : base (value) - { - } - - public XCData (XCData other) - : base (other) - { - } - - public override XmlNodeType NodeType { - get { return XmlNodeType.CDATA; } - } - - public override void WriteTo (XmlWriter w) - { - int start = 0; - StringBuilder sb = null; - for (int i = 0; i < Value.Length - 2; i++) { - if (Value [i] == ']' && Value [i + 1] == ']' - && Value [i + 2] == '>') { - if (sb == null) - sb = new StringBuilder (); - sb.Append (Value, start, i - start); - sb.Append ("]]>"); - start = i + 3; - } - } - if (start != 0 && start != Value.Length) - sb.Append (Value, start, Value.Length - start); - w.WriteCData (sb == null ? Value : sb.ToString ()); - } - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XComment.cs b/RestSharp.Net2/System.Xml.Linq/XComment.cs deleted file mode 100644 index 627930175..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XComment.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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.Xml; - -namespace System.Xml.Linq -{ - public class XComment : XNode - { - string value; - - public XComment (string value) - { - this.value = value; - } - - public XComment (XComment other) - { - this.value = other.value; - } - - public override XmlNodeType NodeType { - get { return XmlNodeType.Comment; } - } - - public string Value { - get { return value; } - set { this.value = value; } - } - - public override void WriteTo (XmlWriter w) - { - w.WriteComment (value); - } - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XContainer.cs b/RestSharp.Net2/System.Xml.Linq/XContainer.cs deleted file mode 100644 index 40db23906..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XContainer.cs +++ /dev/null @@ -1,234 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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; -using System.Collections.Generic; -using System.IO; -using System.Text; -using System.Xml; - -namespace System.Xml.Linq -{ - public abstract class XContainer : XNode - { - internal XContainer () - { - } - - XNode first; - XNode last; - - public XNode FirstNode { - get { return first; } - internal set { first = value; } - } - - public XNode LastNode { - get { return last; } - internal set { last = value; } - } - - void CheckChildType (object o, bool addFirst) - { - if (o == null || o is string || o is XNode) - return; - if (o is IEnumerable) { - foreach (object oc in ((IEnumerable) o)) - CheckChildType (oc, addFirst); - return; - } - else - throw new ArgumentException ("Invalid child type: " + o.GetType ()); - } - - public void Add (object content) - { - if (content == null) - return; - - foreach (object o in XUtil.ExpandArray (content)) - { - if (!OnAddingObject (o, false, last, false)) - { - OnAddingObject (); - AddNode (XUtil.ToNode (o)); - OnAddedObject (); - } - } - } - - void AddNode (XNode n) - { - CheckChildType (n, false); - n = (XNode) XUtil.GetDetachedObject (n); - n.SetOwner (this); - if (first == null) - last = first = n; - else { - last.NextNode = n; - n.PreviousNode = last; - last = n; - } - } - - public void Add (params object [] content) - { - if (content == null) - return; - foreach (object o in XUtil.ExpandArray (content)) - Add (o); - } - - public void AddFirst (object content) - { - if (first == null) - Add (content); - else - first.AddBeforeSelf (XUtil.ExpandArray (content)); - } - - public void AddFirst (params object [] content) - { - if (content == null) - return; - if (first == null) - Add (content); - else - foreach (object o in XUtil.ExpandArray (content)) - if (!OnAddingObject (o, false, first.PreviousNode, true)) - first.AddBeforeSelf (o); - } - - internal virtual bool OnAddingObject (object o, bool rejectAttribute, XNode refNode, bool addFirst) - { - return false; - } - - public XmlWriter CreateWriter () - { - return new XNodeWriter (this); - } - - public IEnumerable Nodes () - { - XNode next; - for (XNode n = FirstNode; n != null; n = next) { - next = n.NextNode; - yield return n; - } - } - - public IEnumerable DescendantNodes () - { - foreach (XNode n in Nodes ()) { - yield return n; - XContainer c = n as XContainer; - if (c != null) - foreach (XNode d in c.DescendantNodes ()) - yield return d; - } - } - - public IEnumerable Descendants () - { - foreach (XNode n in DescendantNodes ()) { - XElement el = n as XElement; - if (el != null) - yield return el; - } - } - - public IEnumerable Descendants (XName name) - { - foreach (XElement el in Descendants ()) - if (el.Name == name) - yield return el; - } - - public IEnumerable Elements () - { - foreach (XNode n in Nodes ()) { - XElement el = n as XElement; - if (el != null) - yield return el; - } - } - - public IEnumerable Elements (XName name) - { - foreach (XElement el in Elements ()) - if (el.Name == name) - yield return el; - } - - public XElement Element (XName name) - { - foreach (XElement el in Elements ()) - if (el.Name == name) - return el; - return null; - } - - internal void ReadContentFrom (XmlReader reader, LoadOptions options) - { - while (!reader.EOF) { - if (reader.NodeType == XmlNodeType.EndElement) - // end of the element. - break; - Add (XNode.ReadFrom (reader, options)); - } - } - - public void RemoveNodes () - { - foreach (XNode n in Nodes ()) - n.Remove (); - } - - public void ReplaceNodes (object content) - { - // First, it creates a snapshot copy, then removes the contents, and then adds the copy. http://msdn.microsoft.com/en-us/library/system.xml.linq.xcontainer.replacenodes.aspx - - if (FirstNode == null) { - Add (content); - return; - } - - var l = new List (); - foreach (var obj in XUtil.ExpandArray (content)) - l.Add (obj); - - RemoveNodes (); - Add (l); - } - - public void ReplaceNodes (params object [] content) - { - ReplaceNodes ((object) content); - } - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XDeclaration.cs b/RestSharp.Net2/System.Xml.Linq/XDeclaration.cs deleted file mode 100644 index 916386eaa..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XDeclaration.cs +++ /dev/null @@ -1,101 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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; -using System.Collections.Generic; -using System.IO; -using System.Text; -using System.Xml; - -namespace System.Xml.Linq -{ - public class XDeclaration - { - string encoding, standalone, version; - - public XDeclaration (string version, string encoding, string standalone) - { - this.version = version; - this.encoding = encoding; - this.standalone = standalone; - } - - public XDeclaration (XDeclaration other) - { - if (other == null) - throw new ArgumentNullException ("other"); - this.version = other.version; - this.encoding = other.encoding; - this.standalone = other.standalone; - } - - public string Encoding { - get { return encoding; } - set { encoding = value; } - } - - public string Standalone { - get { return standalone; } - set { standalone = value; } - } - - public string Version { - get { return version; } - set { version = value; } - } - - public override string ToString () - { - return String.Concat (""); - } - - /* - public override void WriteTo (XmlWriter w) - { - StringBuilder sb = new StringBuilder (); - sb.AppendFormat ("version=\"{0}\"", version); - if (encoding != null) - sb.AppendFormat (" encoding=\"{0}\"", encoding); - if (standalone != null) - sb.AppendFormat (" standalone=\"{0}\"", standalone); - // "xml" is not allowed PI, but because of nasty - // XmlWriter API design it must pass. - w.WriteProcessingInstruction ("xml", sb.ToString ()); - } - */ - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XDocument.cs b/RestSharp.Net2/System.Xml.Linq/XDocument.cs deleted file mode 100644 index d8a0ad6dd..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XDocument.cs +++ /dev/null @@ -1,298 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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; -using System.Collections.Generic; -using System.IO; -using System.Text; -using System.Xml; -using System.Xml.Schema; -using System.Xml.Serialization; - -namespace System.Xml.Linq -{ - public class XDocument : XContainer - { - XDeclaration xmldecl; - - public XDocument () - { - } - - public XDocument (params object [] content) - { - Add (content); - } - - public XDocument (XDeclaration xmldecl, params object [] content) - { - Declaration = xmldecl; - Add (content); - } - - public XDocument (XDocument other) - { - foreach (object o in other.Nodes ()) - Add (XUtil.Clone (o)); - } - - public XDeclaration Declaration { - get { return xmldecl; } - set { xmldecl = value; } - } - - public XDocumentType DocumentType { - get { - foreach (object o in Nodes ()) - if (o is XDocumentType) - return (XDocumentType) o; - return null; - } - } - - public override XmlNodeType NodeType { - get { return XmlNodeType.Document; } - } - - public XElement Root { - get { - foreach (object o in Nodes ()) - if (o is XElement) - return (XElement) o; - return null; - } - } - - public static XDocument Load (string uri) - { - return Load (uri, LoadOptions.None); - } - - public static XDocument Load (string uri, LoadOptions options) - { - XmlReaderSettings s = new XmlReaderSettings (); -#if !MOONLIGHT - s.ProhibitDtd = false; // see XNodeNavigatorTest.MoveToId(). -#endif - s.IgnoreWhitespace = (options & LoadOptions.PreserveWhitespace) == 0; - using (XmlReader r = XmlReader.Create (uri, s)) { - return LoadCore (r, options); - } - } - - public static XDocument Load (Stream stream) - { - return Load (new StreamReader (stream), LoadOptions.None); - } - - public static XDocument Load (Stream stream, LoadOptions options) - { - return Load (new StreamReader (stream), options); - } - - public static XDocument Load (TextReader reader) - { - return Load (reader, LoadOptions.None); - } - - public static XDocument Load (TextReader reader, LoadOptions options) - { - XmlReaderSettings s = new XmlReaderSettings (); -#if !MOONLIGHT - s.ProhibitDtd = false; // see XNodeNavigatorTest.MoveToId(). -#endif - s.IgnoreWhitespace = (options & LoadOptions.PreserveWhitespace) == 0; - using (XmlReader r = XmlReader.Create (reader, s)) { - return LoadCore (r, options); - } - } - - public static XDocument Load (XmlReader reader) - { - return Load (reader, LoadOptions.None); - } - - public static XDocument Load (XmlReader reader, LoadOptions options) - { - XmlReaderSettings s = reader.Settings != null ? reader.Settings.Clone () : new XmlReaderSettings (); - s.IgnoreWhitespace = (options & LoadOptions.PreserveWhitespace) == 0; - using (XmlReader r = XmlReader.Create (reader, s)) { - return LoadCore (r, options); - } - } - - static XDocument LoadCore (XmlReader reader, LoadOptions options) - { - XDocument doc = new XDocument (); - doc.ReadContent (reader, options); - return doc; - } - - void ReadContent (XmlReader reader, LoadOptions options) - { - if (reader.ReadState == ReadState.Initial) - reader.Read (); - this.FillLineInfoAndBaseUri (reader, options); - if (reader.NodeType == XmlNodeType.XmlDeclaration) { - Declaration = new XDeclaration ( - reader.GetAttribute ("version"), - reader.GetAttribute ("encoding"), - reader.GetAttribute ("standalone")); - reader.Read (); - } - ReadContentFrom (reader, options); - if (Root == null) - throw new InvalidOperationException ("The document element is missing."); - } - - static void ValidateWhitespace (string s) - { - for (int i = 0; i < s.Length; i++) - switch (s [i]) { - case ' ': case '\t': case '\n': case '\r': - continue; - default: - throw new ArgumentException ("Non-whitespace text appears directly in the document."); - } - } - - public static XDocument Parse (string s) - { - return Parse (s, LoadOptions.None); - } - - public static XDocument Parse (string s, LoadOptions options) - { - return Load (new StringReader (s), options); - } - - public void Save (string filename) - { - Save (filename, SaveOptions.None); - } - - public void Save (string filename, SaveOptions options) - { - XmlWriterSettings s = new XmlWriterSettings (); - if ((options & SaveOptions.DisableFormatting) == SaveOptions.None) - s.Indent = true; -#if NET_4_0 - if ((options & SaveOptions.OmitDuplicateNamespaces) == SaveOptions.OmitDuplicateNamespaces) - s.NamespaceHandling |= NamespaceHandling.OmitDuplicates; -#endif - - using (XmlWriter w = XmlWriter.Create (filename, s)) { - Save (w); - } - } - - public void Save (TextWriter tw) - { - Save (tw, SaveOptions.None); - } - - public void Save (TextWriter tw, SaveOptions options) - { - XmlWriterSettings s = new XmlWriterSettings (); - if ((options & SaveOptions.DisableFormatting) == SaveOptions.None) - s.Indent = true; -#if NET_4_0 - if ((options & SaveOptions.OmitDuplicateNamespaces) == SaveOptions.OmitDuplicateNamespaces) - s.NamespaceHandling |= NamespaceHandling.OmitDuplicates; -#endif - using (XmlWriter w = XmlWriter.Create (tw, s)) { - Save (w); - } - } - - public void Save (XmlWriter w) - { - WriteTo (w); - } - - public override void WriteTo (XmlWriter w) - { - if (xmldecl != null) { - if (xmldecl.Standalone != null) - w.WriteStartDocument (xmldecl.Standalone == "yes"); - else - w.WriteStartDocument (); - } - foreach (XNode node in Nodes ()) - node.WriteTo (w); - } - - internal override bool OnAddingObject (object obj, bool rejectAttribute, XNode refNode, bool addFirst) - { - VerifyAddedNode (obj, addFirst); - return false; - } - - void VerifyAddedNode (object node, bool addFirst) - { - if (node == null) - throw new InvalidOperationException ("Only a node is allowed here"); - - if (node is string) - ValidateWhitespace ((string) node); - if (node is XText) - ValidateWhitespace (((XText) node).Value); - else if (node is XDocumentType) { - if (DocumentType != null) - throw new InvalidOperationException ("There already is another document type declaration"); - if (Root != null && !addFirst) - throw new InvalidOperationException ("A document type cannot be added after the document element"); - } - else if (node is XElement) { - if (Root != null) - throw new InvalidOperationException ("There already is another document element"); - if (DocumentType != null && addFirst) - throw new InvalidOperationException ("An element cannot be added before the document type declaration"); - } - } -#if NET_4_0 - public void Save (Stream stream) - { - Save (stream, SaveOptions.None); - } - - public void Save (Stream stream, SaveOptions options) - { - XmlWriterSettings s = new XmlWriterSettings (); - if ((options & SaveOptions.DisableFormatting) == SaveOptions.None) - s.Indent = true; - if ((options & SaveOptions.OmitDuplicateNamespaces) == SaveOptions.OmitDuplicateNamespaces) - s.NamespaceHandling |= NamespaceHandling.OmitDuplicates; - - using (var writer = XmlWriter.Create (stream, s)){ - Save (writer); - } - } - -#endif - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XDocumentType.cs b/RestSharp.Net2/System.Xml.Linq/XDocumentType.cs deleted file mode 100644 index 8bbcac9b1..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XDocumentType.cs +++ /dev/null @@ -1,106 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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; -using System.Collections.Generic; -using System.IO; -using System.Text; -using System.Xml; - -namespace System.Xml.Linq -{ - public class XDocumentType : XNode - { - string name, pubid, sysid, intSubset; - - public XDocumentType (string name, string publicId, string systemId, string internalSubset) - { - this.name = name; - pubid = publicId; - sysid = systemId; - intSubset = internalSubset; - } - - public XDocumentType (XDocumentType other) - { - if (other == null) - throw new ArgumentNullException ("other"); - name = other.name; - pubid = other.pubid; - sysid = other.sysid; - intSubset = other.intSubset; - } - - public string Name { - get { return name; } - set { - if (value == null) - throw new ArgumentNullException ("value"); - name = value; - } - } - - public string PublicId { - get { return pubid; } - set { - if (value == null) - throw new ArgumentNullException ("value"); - pubid = value; - } - } - - public string SystemId { - get { return sysid; } - set { - if (value == null) - throw new ArgumentNullException ("value"); - sysid = value; - } - } - - public string InternalSubset { - get { return intSubset; } - set { - if (value == null) - throw new ArgumentNullException ("value"); - intSubset = value; - } - } - - public override XmlNodeType NodeType { - get { return XmlNodeType.DocumentType; } - } - - public override void WriteTo (XmlWriter w) - { - XDocument doc = Document; - XElement root = doc.Root; - if (root != null) - w.WriteDocType (root.Name.LocalName, pubid, sysid, intSubset); - } - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XElement.cs b/RestSharp.Net2/System.Xml.Linq/XElement.cs deleted file mode 100644 index 408b3a857..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XElement.cs +++ /dev/null @@ -1,829 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Xml; -using System.Xml.Schema; -using System.Xml.Serialization; - -namespace System.Xml.Linq -{ - [XmlSchemaProvider (null, IsAny = true)] - public class XElement : XContainer, IXmlSerializable - { - static IEnumerable emptySequence = - new List (); - - public static IEnumerable EmptySequence { - get { return emptySequence; } - } - - XName name; - XAttribute attr_first, attr_last; - bool explicit_is_empty = true; - - public XElement (XName name, object value) - { - this.name = name; - Add (value); - } - - public XElement (XElement source) - { - name = source.name; - Add (source.Attributes ()); - Add (source.Nodes ()); - } - - public XElement (XName name) - { - this.name = name; - } - - public XElement (XName name, params object [] contents) - { - this.name = name; - Add (contents); - } - - public XElement (XStreamingElement source) - { - this.name = source.Name; - Add (source.Contents); - } - - [CLSCompliant (false)] - public static explicit operator bool (XElement element) - { - if (element == null) - throw new ArgumentNullException ("element"); - return XUtil.ConvertToBoolean (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator bool? (XElement element) - { - if (element == null) - return null; - - return element.Value == null ? (bool?) null : XUtil.ConvertToBoolean (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator DateTime (XElement element) - { - if (element == null) - throw new ArgumentNullException ("element"); - return XUtil.ToDateTime (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator DateTime? (XElement element) - { - if (element == null) - return null; - - return element.Value == null ? (DateTime?) null : XUtil.ToDateTime (element.Value); - } - -#if !TARGET_JVM // Same as for System.Xml.XmlConvert.ToDateTimeOffset - - [CLSCompliant (false)] - public static explicit operator DateTimeOffset (XElement element) - { - if (element == null) - throw new ArgumentNullException ("element"); - return XmlConvert.ToDateTimeOffset (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator DateTimeOffset? (XElement element) - { - if (element == null) - return null; - - return element.Value == null ? (DateTimeOffset?) null : XmlConvert.ToDateTimeOffset (element.Value); - } - -#endif - - [CLSCompliant (false)] - public static explicit operator decimal (XElement element) - { - if (element == null) - throw new ArgumentNullException ("element"); - return XmlConvert.ToDecimal (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator decimal? (XElement element) - { - if (element == null) - return null; - - return element.Value == null ? (decimal?) null : XmlConvert.ToDecimal (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator double (XElement element) - { - if (element == null) - throw new ArgumentNullException ("element"); - return XmlConvert.ToDouble (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator double? (XElement element) - { - if (element == null) - return null; - - return element.Value == null ? (double?) null : XmlConvert.ToDouble (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator float (XElement element) - { - if (element == null) - throw new ArgumentNullException ("element"); - return XmlConvert.ToSingle (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator float? (XElement element) - { - if (element == null) - return null; - - return element.Value == null ? (float?) null : XmlConvert.ToSingle (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator Guid (XElement element) - { - if (element == null) - throw new ArgumentNullException ("element"); - return XmlConvert.ToGuid (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator Guid? (XElement element) - { - if (element == null) - return null; - - return element.Value == null ? (Guid?) null : XmlConvert.ToGuid (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator int (XElement element) - { - if (element == null) - throw new ArgumentNullException ("element"); - return XmlConvert.ToInt32 (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator int? (XElement element) - { - if (element == null) - return null; - - return element.Value == null ? (int?) null : XmlConvert.ToInt32 (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator long (XElement element) - { - if (element == null) - throw new ArgumentNullException ("element"); - return XmlConvert.ToInt64 (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator long? (XElement element) - { - if (element == null) - return null; - - return element.Value == null ? (long?) null : XmlConvert.ToInt64 (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator uint (XElement element) - { - if (element == null) - throw new ArgumentNullException ("element"); - return XmlConvert.ToUInt32 (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator uint? (XElement element) - { - if (element == null) - return null; - - return element.Value == null ? (uint?) null : XmlConvert.ToUInt32 (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator ulong (XElement element) - { - if (element == null) - throw new ArgumentNullException ("element"); - return XmlConvert.ToUInt64 (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator ulong? (XElement element) - { - if (element == null) - return null; - - return element.Value == null ? (ulong?) null : XmlConvert.ToUInt64 (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator TimeSpan (XElement element) - { - if (element == null) - throw new ArgumentNullException ("element"); - return XmlConvert.ToTimeSpan (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator TimeSpan? (XElement element) - { - if (element == null) - return null; - - return element.Value == null ? (TimeSpan?) null : XmlConvert.ToTimeSpan (element.Value); - } - - [CLSCompliant (false)] - public static explicit operator string (XElement element) - { - if (element == null) - return null; - - return element.Value; - } - - public XAttribute FirstAttribute { - get { return attr_first; } - internal set { attr_first = value; } - } - - public XAttribute LastAttribute { - get { return attr_last; } - internal set { attr_last = value; } - } - - public bool HasAttributes { - get { return attr_first != null; } - } - - public bool HasElements { - get { - foreach (object o in Nodes ()) - if (o is XElement) - return true; - return false; - } - } - - public bool IsEmpty { - get { return !Nodes ().GetEnumerator ().MoveNext () && explicit_is_empty; } - internal set { explicit_is_empty = value; } - } - - public XName Name { - get { return name; } - set { - if (value == null) - throw new ArgumentNullException ("Name"); - name = value; - } - } - - public override XmlNodeType NodeType { - get { return XmlNodeType.Element; } - } - - public string Value { - get { - StringBuilder sb = null; - foreach (XNode n in Nodes ()) { - if (sb == null) - sb = new StringBuilder (); - if (n is XText) - sb.Append (((XText) n).Value); - else if (n is XElement) - sb.Append (((XElement) n).Value); - } - return sb == null ? String.Empty : sb.ToString (); - } - set { - RemoveNodes (); - Add (value); - } - } - - IEnumerable GetAncestorList (XName name, bool getMeIn) - { - List list = new List (); - if (getMeIn) - list.Add (this); - for (XElement el = Parent as XElement; el != null; el = el.Parent as XElement) - if (name == null || el.Name == name) - list.Add (el); - return list; - } - - public XAttribute Attribute (XName name) - { - foreach (XAttribute a in Attributes ()) - if (a.Name == name) - return a; - return null; - } - - public IEnumerable Attributes () - { - XAttribute next; - for (XAttribute a = attr_first; a != null; a = next) { - next = a.NextAttribute; - yield return a; - } - } - - // huh? - public IEnumerable Attributes (XName name) - { - foreach (XAttribute a in Attributes ()) - if (a.Name == name) - yield return a; - } - - static void DefineDefaultSettings (XmlReaderSettings settings, LoadOptions options) - { -#if MOONLIGHT - // 2.1 has a DtdProcessing property which defaults to DtdProcessing.Prohibit - settings.DtdProcessing = DtdProcessing.Parse; -#else - settings.ProhibitDtd = false; -#endif - - settings.IgnoreWhitespace = (options & LoadOptions.PreserveWhitespace) == 0; - } - - static XmlReaderSettings CreateDefaultSettings (LoadOptions options) - { - var settings = new XmlReaderSettings (); - DefineDefaultSettings (settings, options); - return settings; - } - - public static XElement Load (string uri) - { - return Load (uri, LoadOptions.None); - } - - public static XElement Load (string uri, LoadOptions options) - { - XmlReaderSettings s = CreateDefaultSettings (options); - - using (XmlReader r = XmlReader.Create (uri, s)) { - return LoadCore (r, options); - } - } - - public static XElement Load (TextReader tr) - { - return Load (tr, LoadOptions.None); - } - - public static XElement Load (TextReader tr, LoadOptions options) - { - XmlReaderSettings s = CreateDefaultSettings (options); - - using (XmlReader r = XmlReader.Create (tr, s)) { - return LoadCore (r, options); - } - } - - public static XElement Load (XmlReader reader) - { - return Load (reader, LoadOptions.None); - } - - public static XElement Load (XmlReader reader, LoadOptions options) - { - XmlReaderSettings s = reader.Settings != null ? reader.Settings.Clone () : new XmlReaderSettings (); - DefineDefaultSettings (s, options); - - using (XmlReader r = XmlReader.Create (reader, s)) { - return LoadCore (r, options); - } - } - -#if MOONLIGHT || MOBILE || NET_4_0 - public static XElement Load (Stream stream) - { - return Load (stream, LoadOptions.None); - } - - public static XElement Load (Stream stream, LoadOptions options) - { - XmlReaderSettings s = new XmlReaderSettings (); - DefineDefaultSettings (s, options); - - using (XmlReader r = XmlReader.Create (stream, s)) { - return LoadCore (r, options); - } - } -#endif - - internal static XElement LoadCore (XmlReader r, LoadOptions options) - { - r.MoveToContent (); - if (r.NodeType != XmlNodeType.Element) - throw new InvalidOperationException ("The XmlReader must be positioned at an element"); - XName name = XName.Get (r.LocalName, r.NamespaceURI); - XElement e = new XElement (name); - e.FillLineInfoAndBaseUri (r, options); - - if (r.MoveToFirstAttribute ()) { - do { - // not sure how current Orcas behavior makes sense here though ... - if (r.LocalName == "xmlns" && r.NamespaceURI == XNamespace.Xmlns.NamespaceName) - e.SetAttributeValue (XNamespace.None.GetName ("xmlns"), r.Value); - else - e.SetAttributeValue (XName.Get (r.LocalName, r.NamespaceURI), r.Value); - e.LastAttribute.FillLineInfoAndBaseUri (r, options); - } while (r.MoveToNextAttribute ()); - r.MoveToElement (); - } - if (!r.IsEmptyElement) { - r.Read (); - e.ReadContentFrom (r, options); - r.ReadEndElement (); - e.explicit_is_empty = false; - } else { - e.explicit_is_empty = true; - r.Read (); - } - return e; - } - - public static XElement Parse (string s) - { - return Parse (s, LoadOptions.None); - } - - public static XElement Parse (string s, LoadOptions options) - { - return Load (new StringReader (s), options); - } - - public void RemoveAll () - { - RemoveAttributes (); - RemoveNodes (); - } - - public void RemoveAttributes () - { - while (attr_first != null) - attr_last.Remove (); - } - - public void Save (string filename) - { - Save (filename, SaveOptions.None); - } - - public void Save (string filename, SaveOptions options) - { - XmlWriterSettings s = new XmlWriterSettings (); - - if ((options & SaveOptions.DisableFormatting) == SaveOptions.None) - s.Indent = true; -#if NET_4_0 || MOONLIGHT || MOBILE - if ((options & SaveOptions.OmitDuplicateNamespaces) == SaveOptions.OmitDuplicateNamespaces) - s.NamespaceHandling |= NamespaceHandling.OmitDuplicates; -#endif - using (XmlWriter w = XmlWriter.Create (filename, s)) { - Save (w); - } - } - - public void Save (TextWriter tw) - { - Save (tw, SaveOptions.None); - } - - public void Save (TextWriter tw, SaveOptions options) - { - XmlWriterSettings s = new XmlWriterSettings (); - - if ((options & SaveOptions.DisableFormatting) == SaveOptions.None) - s.Indent = true; -#if NET_4_0 || MOONLIGHT || MOBILE - if ((options & SaveOptions.OmitDuplicateNamespaces) == SaveOptions.OmitDuplicateNamespaces) - s.NamespaceHandling |= NamespaceHandling.OmitDuplicates; -#endif - using (XmlWriter w = XmlWriter.Create (tw, s)) { - Save (w); - } - } - - public void Save (XmlWriter w) - { - WriteTo (w); - } - -#if NET_4_0 || MOONLIGHT || MOBILE - public void Save (Stream stream) - { - Save (stream, SaveOptions.None); - } - - public void Save (Stream stream, SaveOptions options) - { - XmlWriterSettings s = new XmlWriterSettings (); - if ((options & SaveOptions.DisableFormatting) == SaveOptions.None) - s.Indent = true; - if ((options & SaveOptions.OmitDuplicateNamespaces) == SaveOptions.OmitDuplicateNamespaces) - s.NamespaceHandling |= NamespaceHandling.OmitDuplicates; - - using (var writer = XmlWriter.Create (stream, s)){ - Save (writer); - } - } -#endif - public IEnumerable AncestorsAndSelf () - { - return GetAncestorList (null, true); - } - - public IEnumerable AncestorsAndSelf (XName name) - { - return GetAncestorList (name, true); - } - - public IEnumerable DescendantsAndSelf () - { - List list = new List (); - list.Add (this); - list.AddRange (Descendants ()); - return list; - } - - public IEnumerable DescendantsAndSelf (XName name) - { - List list = new List (); - if (name == this.name) - list.Add (this); - list.AddRange (Descendants (name)); - return list; - } - - public IEnumerable DescendantNodesAndSelf () - { - yield return this; - foreach (XNode node in DescendantNodes ()) - yield return node; - } - - public void SetAttributeValue (XName name, object value) - { - XAttribute a = Attribute (name); - if (value == null) { - if (a != null) - a.Remove (); - } else { - if (a == null) { - SetAttributeObject (new XAttribute (name, value)); - } - else - a.Value = XUtil.ToString (value); - } - } - - void SetAttributeObject (XAttribute a) - { - a = (XAttribute) XUtil.GetDetachedObject (a); - a.SetOwner (this); - if (attr_first == null) { - attr_first = a; - attr_last = a; - } else { - attr_last.NextAttribute = a; - a.PreviousAttribute = attr_last; - attr_last = a; - } - } - - string LookupPrefix (string ns, XmlWriter w) - { - string prefix = ns.Length > 0 ? w.LookupPrefix (ns) : String.Empty; - foreach (XAttribute a in Attributes ()) { - if (a.IsNamespaceDeclaration && a.Value == ns) { - if (a.Name.Namespace == XNamespace.Xmlns) - prefix = a.Name.LocalName; - // otherwise xmlns="..." - break; - } - } - return prefix; - } - - public override void WriteTo (XmlWriter w) - { - // some people expect the same prefix output as in input, - // in the loss of performance... see bug #466423. - int createdNS = 0; - string prefix = LookupPrefix (name.NamespaceName, w); - Func nsCreator = () => { - string p = null; - do { - p = "p" + (++createdNS); - // check conflict - if (Attributes ().All (a => a.Name.LocalName != p)) - break; - } while (true); - return p; - }; - if (prefix == null) - prefix = nsCreator (); - - w.WriteStartElement (prefix, name.LocalName, name.Namespace.NamespaceName); - - foreach (XAttribute a in Attributes ()) { - if (a.IsNamespaceDeclaration) { - if (a.Name.Namespace == XNamespace.Xmlns) - w.WriteAttributeString ("xmlns", a.Name.LocalName, XNamespace.Xmlns.NamespaceName, a.Value); - else - w.WriteAttributeString ("xmlns", a.Value); - } else { - string apfix = LookupPrefix (a.Name.NamespaceName, w); - if (apfix == null) - apfix = nsCreator (); - w.WriteAttributeString (apfix, a.Name.LocalName, a.Name.Namespace.NamespaceName, a.Value); - } - } - - foreach (XNode node in Nodes ()) - node.WriteTo (w); - - if (explicit_is_empty) - w.WriteEndElement (); - else - w.WriteFullEndElement (); - } - - public XNamespace GetDefaultNamespace () - { - for (XElement el = this; el != null; el = el.Parent) - foreach (XAttribute a in el.Attributes ()) - if (a.IsNamespaceDeclaration && a.Name.Namespace == XNamespace.None) - return XNamespace.Get (a.Value); - return XNamespace.None; // nothing is declared. - } - - public XNamespace GetNamespaceOfPrefix (string prefix) - { - for (XElement el = this; el != null; el = el.Parent) - foreach (XAttribute a in el.Attributes ()) - if (a.IsNamespaceDeclaration && (prefix.Length == 0 && a.Name.LocalName == "xmlns" || a.Name.LocalName == prefix)) - return XNamespace.Get (a.Value); - return XNamespace.None; // nothing is declared. - } - - public string GetPrefixOfNamespace (XNamespace ns) - { - foreach (string prefix in GetPrefixOfNamespaceCore (ns)) - if (GetNamespaceOfPrefix (prefix) == ns) - return prefix; - return null; // nothing is declared - } - - IEnumerable GetPrefixOfNamespaceCore (XNamespace ns) - { - for (XElement el = this; el != null; el = el.Parent) - foreach (XAttribute a in el.Attributes ()) - if (a.IsNamespaceDeclaration && a.Value == ns.NamespaceName) - yield return a.Name.Namespace == XNamespace.None ? String.Empty : a.Name.LocalName; - } - - public void ReplaceAll (object item) - { - RemoveNodes (); - Add (item); - } - - public void ReplaceAll (params object [] items) - { - RemoveNodes (); - Add (items); - } - - public void ReplaceAttributes (object item) - { - RemoveAttributes (); - Add (item); - } - - public void ReplaceAttributes (params object [] items) - { - RemoveAttributes (); - Add (items); - } - - public void SetElementValue (XName name, object value) - { - var element = Element (name); - if (element == null) { - element = new XElement (name, value); - Add (element); - } else - element.SetValue (value); - } - - public void SetValue (object value) - { - if (value == null) - throw new ArgumentNullException ("value"); - if (value is XAttribute || value is XDocument || value is XDeclaration || value is XDocumentType) - throw new ArgumentException (String.Format ("Node type {0} is not allowed as element value", value.GetType ())); - RemoveNodes (); - foreach (object o in XUtil.ExpandArray (value)) - Add (o); - } - - internal override bool OnAddingObject (object o, bool rejectAttribute, XNode refNode, bool addFirst) - { - if (o is XDocument || o is XDocumentType || o is XDeclaration || (rejectAttribute && o is XAttribute)) - throw new ArgumentException (String.Format ("A node of type {0} cannot be added as a content", o.GetType ())); - - XAttribute a = o as XAttribute; - if (a != null) { - foreach (XAttribute ia in Attributes ()) - if (a.Name == ia.Name) - throw new InvalidOperationException (String.Format ("Duplicate attribute: {0}", a.Name)); - SetAttributeObject (a); - return true; - } - else if (o is string && refNode is XText) { - ((XText) refNode).Value += o as string; - return true; - } - else - return false; - } - - void IXmlSerializable.WriteXml (XmlWriter writer) - { - Save (writer); - } - - void IXmlSerializable.ReadXml (XmlReader reader) - { - ReadContentFrom (reader, LoadOptions.None); - } - - XmlSchema IXmlSerializable.GetSchema () - { - return null; - } - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XIterators.cs b/RestSharp.Net2/System.Xml.Linq/XIterators.cs deleted file mode 100644 index 4749ff0ae..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XIterators.cs +++ /dev/null @@ -1,139 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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_2_0 - -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Text; -using System.Xml; - -using XPI = System.Xml.Linq.XProcessingInstruction; - - -namespace System.Xml.Linq -{ - /* - // Iterators - internal class XFilterIterator : IEnumerable - { - IEnumerable source; - XName name; - - public XFilterIterator (IEnumerable source, XName name) - { - this.source = source; - this.name = name; - } - - public IEnumerator GetEnumerator () - { - foreach (object o in source) { - if (! (o is T)) - continue; - if (name != null) { - if (o is XElement) { - if (((XElement) o).Name != name) - continue; - } - else if (o is XAttribute) { - if (((XAttribute) o).Name != name) - continue; - } - } - yield return (T) o; - } - } - - IEnumerator IEnumerable.GetEnumerator () - { - return GetEnumerator (); - } - } - - internal class XDescendantIterator : IEnumerable - { - IEnumerable source; - - public XDescendantIterator (IEnumerable source) - { - this.source = new XFilterIterator (source, null); - } - - public IEnumerator GetEnumerator () - { - foreach (T t1 in source) { - yield return t1; - XContainer xc = t1 as XContainer; - if (xc == null || xc.FirstChild == null) - continue; - foreach (T t2 in new XDescendantIterator (xc.Content ())) - yield return t2; - } - } - - IEnumerator IEnumerable.GetEnumerator () - { - return GetEnumerator (); - } - } - */ - -#if !LIST_BASED - internal class XChildrenIterator : IEnumerable - { - XContainer source; - XNode n; - - public XChildrenIterator (XContainer source) - { - this.source = source; - } - - public IEnumerator GetEnumerator () - { - if (n == null) { - n = source.FirstNode; - if (n == null) - yield break; - } - do { - yield return n; - n = n.NextNode; - } while (n != source.LastNode); - } - - IEnumerator IEnumerable.GetEnumerator () - { - return GetEnumerator (); - } - } -#endif -} - -#endif diff --git a/RestSharp.Net2/System.Xml.Linq/XName.cs b/RestSharp.Net2/System.Xml.Linq/XName.cs deleted file mode 100644 index 1559ee755..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XName.cs +++ /dev/null @@ -1,172 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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_2_0 - -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Xml; - -using XPI = System.Xml.Linq.XProcessingInstruction; - -namespace System.Xml.Linq -{ - [Serializable] - public sealed class XName : IEquatable, ISerializable - { - string local; - XNamespace ns; - - XName (SerializationInfo info, StreamingContext context) - { - string expandedName = info.GetString ("name"); - string local, ns; - ExpandName (expandedName, out local, out ns); - this.local = local; - this.ns = XNamespace.Get (ns); - } - - internal XName (string local, XNamespace ns) - { - this.local = XmlConvert.VerifyNCName (local); - this.ns = ns; - } - - static Exception ErrorInvalidExpandedName () - { - return new ArgumentException ("Invalid expanded name."); - } - - public string LocalName { - get { return local; } - } - - public XNamespace Namespace { - get { return ns; } - } - - public string NamespaceName { - get { return ns.NamespaceName; } - } - - public override bool Equals (object obj) - { - XName n = obj as XName; - return n != null && this == n; - } - - bool IEquatable.Equals (XName other) - { - return this == other; - } - - public static XName Get (string expandedName) - { - string local, ns; - ExpandName (expandedName, out local, out ns); - return Get (local, ns); - } - - static void ExpandName (string expandedName, out string local, out string ns) - { - if (expandedName == null) - throw new ArgumentNullException ("expandedName"); - ns = null; - local = null; - if (expandedName.Length == 0) - throw ErrorInvalidExpandedName (); - //this.expanded = expandedName; - if (expandedName [0] == '{') { - for (int i = 1; i < expandedName.Length; i++) { - if (expandedName [i] == '}') - ns = expandedName.Substring (1, i - 1); - } - if (String.IsNullOrEmpty (ns)) // {}foo is invalid - throw ErrorInvalidExpandedName (); - if (expandedName.Length == ns.Length + 2) // {foo} is invalid - throw ErrorInvalidExpandedName (); - local = expandedName.Substring (ns.Length + 2); - } - else { - local = expandedName; - ns = String.Empty; - } - } - - public static XName Get (string localName, string namespaceName) - { - return XNamespace.Get (namespaceName).GetName (localName); - } - - public override int GetHashCode () - { - return local.GetHashCode () ^ ns.GetHashCode (); - } - - public static bool operator == (XName n1, XName n2) - { - if ((object) n1 == null) - return (object) n2 == null; - else if ((object) n2 == null) - return false; - return object.ReferenceEquals (n1, n2) || - n1.local == n2.local && n1.ns == n2.ns; - } - - [CLSCompliant (false)] - public static implicit operator XName (string s) - { - return s == null ? null : Get (s); - } - - public static bool operator != (XName n1, XName n2) - { - return ! (n1 == n2); - } - - public override string ToString () - { - if (ns == XNamespace.None) - return local; - return String.Concat ("{", ns.NamespaceName, "}", local); - } - - // in .NET it is serialized as "NameSerializer". dunno how to create it. - void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context) - { - if (info == null) - throw new ArgumentNullException ("info"); - - info.AddValue ("name", ToString ()); - } - } -} - -#endif diff --git a/RestSharp.Net2/System.Xml.Linq/XNamespace.cs b/RestSharp.Net2/System.Xml.Linq/XNamespace.cs deleted file mode 100644 index 0b0fc3907..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XNamespace.cs +++ /dev/null @@ -1,140 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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; -using System.Collections.Generic; -using System.IO; -using System.Text; -using System.Xml; - -namespace System.Xml.Linq -{ - public sealed class XNamespace - { - static readonly XNamespace blank, xml, xmlns; - static Dictionary nstable; - - static XNamespace () - { - nstable = new Dictionary (); - blank = Get (String.Empty); - xml = Get ("http://www.w3.org/XML/1998/namespace"); - xmlns = Get ("http://www.w3.org/2000/xmlns/"); - } - - public static XNamespace None { - get { return blank; } - } - - public static XNamespace Xml { - get { return xml; } - } - - public static XNamespace Xmlns { - get { return xmlns; } - } - - public static XNamespace Get (string uri) - { - lock (nstable) { - XNamespace ret; - if (!nstable.TryGetValue (uri, out ret)) { - ret = new XNamespace (uri); - nstable [uri] = ret; - } - return ret; - } - } - - public XName GetName (string localName) - { - if (table == null) - table = new Dictionary (); - lock (table) { - XName ret; - if (!table.TryGetValue (localName, out ret)) { - ret = new XName (localName, this); - table [localName] = ret; - } - return ret; - } - } - - string uri; - Dictionary table; - - XNamespace (string namespaceName) - { - if (namespaceName == null) - throw new ArgumentNullException ("namespaceName"); - uri = namespaceName; - } - - public string NamespaceName { - get { return uri; } - } - - public override bool Equals (object other) - { - if (Object.ReferenceEquals (this, other)) - return true; - XNamespace ns = other as XNamespace; - return ns != null && uri == ns.uri; - } - - public static bool operator == (XNamespace o1, XNamespace o2) - { - return (object) o1 != null ? o1.Equals (o2) : (object) o2 == null; - } - - public static bool operator != (XNamespace o1, XNamespace o2) - { - return ! (o1 == o2); - } - - public static XName operator + (XNamespace ns, string localName) - { - return new XName (localName, ns); - } - - [CLSCompliant (false)] - public static implicit operator XNamespace (string s) - { - return s != null ? XNamespace.Get (s) : null; - } - - public override int GetHashCode () - { - return uri.GetHashCode (); - } - - public override string ToString () - { - return uri; - } - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XNode.cs b/RestSharp.Net2/System.Xml.Linq/XNode.cs deleted file mode 100644 index ecec65afe..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XNode.cs +++ /dev/null @@ -1,327 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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; -using System.Collections.Generic; -using System.IO; -using System.Text; -using System.Xml; - -using XPI = System.Xml.Linq.XProcessingInstruction; - -namespace System.Xml.Linq -{ - public abstract class XNode : XObject - { - public static int CompareDocumentOrder (XNode n1, XNode n2) - { - return order_comparer.Compare (n1, n2); - } - - public static bool DeepEquals (XNode n1, XNode n2) - { - return eq_comparer.Equals (n1, n2); - } - - static XNodeEqualityComparer eq_comparer = - new XNodeEqualityComparer (); - static XNodeDocumentOrderComparer order_comparer = - new XNodeDocumentOrderComparer (); - - XNode previous; - XNode next; - - internal XNode () - { - } - - public static XNodeDocumentOrderComparer DocumentOrderComparer { - get { return order_comparer; } - } - - public static XNodeEqualityComparer EqualityComparer { - get { return eq_comparer; } - } - - public XNode PreviousNode { - get { return previous; } - internal set { previous = value; } - } - - public XNode NextNode { - get { return next; } - internal set { next = value; } - } - - public string ToString (SaveOptions options) - { - StringWriter sw = new StringWriter (); - XmlWriterSettings s = new XmlWriterSettings (); - s.ConformanceLevel = ConformanceLevel.Auto; - s.Indent = options != SaveOptions.DisableFormatting; - XmlWriter xw = XmlWriter.Create (sw, s); - WriteTo (xw); - xw.Close (); - return sw.ToString (); - } - - public void AddAfterSelf (object content) - { - if (Owner == null) - throw new InvalidOperationException (); - XNode here = this; - XNode orgNext = next; - foreach (object o in XUtil.ExpandArray (content)) { - if (o == null || Owner.OnAddingObject (o, true, here, false)) - continue; - XNode n = XUtil.ToNode (o); - n = (XNode) XUtil.GetDetachedObject (n); - n.SetOwner (Owner); - n.previous = here; - here.next = n; - n.next = orgNext; - if (orgNext != null) - orgNext.previous = n; - else - Owner.LastNode = n; - here = n; - } - } - - public void AddAfterSelf (params object [] content) - { - if (Owner == null) - throw new InvalidOperationException (); - AddAfterSelf ((object) content); - } - - public void AddBeforeSelf (object content) - { - if (Owner == null) - throw new InvalidOperationException (); - foreach (object o in XUtil.ExpandArray (content)) { - if (o == null || Owner.OnAddingObject (o, true, previous, true)) - continue; - XNode n = XUtil.ToNode (o); - n = (XNode) XUtil.GetDetachedObject (n); - n.SetOwner (Owner); - n.previous = previous; - n.next = this; - if (previous != null) - previous.next = n; - previous = n; - if (Owner.FirstNode == this) - Owner.FirstNode = n; - } - } - - public void AddBeforeSelf (params object [] content) - { - if (Owner == null) - throw new InvalidOperationException (); - AddBeforeSelf ((object) content); - } - - public static XNode ReadFrom (XmlReader r) - { - return ReadFrom (r, LoadOptions.None); - } - - internal static XNode ReadFrom (XmlReader r, LoadOptions options) - { - switch (r.NodeType) { - case XmlNodeType.Element: - return XElement.LoadCore (r, options); - case XmlNodeType.Whitespace: - case XmlNodeType.SignificantWhitespace: - case XmlNodeType.Text: - XText t = new XText (r.Value); - t.FillLineInfoAndBaseUri (r, options); - r.Read (); - return t; - case XmlNodeType.CDATA: - XCData c = new XCData (r.Value); - c.FillLineInfoAndBaseUri (r, options); - r.Read (); - return c; - case XmlNodeType.ProcessingInstruction: - XPI pi = new XPI (r.Name, r.Value); - pi.FillLineInfoAndBaseUri (r, options); - r.Read (); - return pi; - case XmlNodeType.Comment: - XComment cm = new XComment (r.Value); - cm.FillLineInfoAndBaseUri (r, options); - r.Read (); - return cm; - case XmlNodeType.DocumentType: - XDocumentType d = new XDocumentType (r.Name, - r.GetAttribute ("PUBLIC"), - r.GetAttribute ("SYSTEM"), - r.Value); - d.FillLineInfoAndBaseUri (r, options); - r.Read (); - return d; - default: - throw new InvalidOperationException (String.Format ("Node type {0} is not supported", r.NodeType)); - } - } - - public void Remove () - { - if (Owner == null) - throw new InvalidOperationException ("Owner is missing"); - - if (Owner.FirstNode == this) - Owner.FirstNode = next; - if (Owner.LastNode == this) - Owner.LastNode = previous; - if (previous != null) - previous.next = next; - if (next != null) - next.previous = previous; - previous = null; - next = null; - SetOwner (null); - } - - public override string ToString () - { - return ToString (SaveOptions.None); - } - - public abstract void WriteTo (XmlWriter w); - - public IEnumerable Ancestors () - { - for (XElement el = Parent; el != null; el = el.Parent) - yield return el; - } - - public IEnumerable Ancestors (XName name) - { - foreach (XElement el in Ancestors ()) - if (el.Name == name) - yield return el; - } - - public XmlReader CreateReader () - { - return new XNodeReader (this); - } - - public IEnumerable ElementsAfterSelf () - { - foreach (XNode n in NodesAfterSelf ()) - if (n is XElement) - yield return (XElement) n; - } - - public IEnumerable ElementsAfterSelf (XName name) - { - foreach (XElement el in ElementsAfterSelf ()) - if (el.Name == name) - yield return el; - } - - public IEnumerable ElementsBeforeSelf () - { - foreach (XNode n in NodesBeforeSelf ()) - if (n is XElement) - yield return (XElement) n; - } - - public IEnumerable ElementsBeforeSelf (XName name) - { - foreach (XElement el in ElementsBeforeSelf ()) - if (el.Name == name) - yield return el; - } - - public bool IsAfter (XNode other) - { - return XNode.DocumentOrderComparer.Compare (this, other) > 0; - } - - public bool IsBefore (XNode other) - { - return XNode.DocumentOrderComparer.Compare (this, other) < 0; - } - - public IEnumerable NodesAfterSelf () - { - if (Owner == null) - yield break; - for (XNode n = NextNode; n != null; n = n.NextNode) - yield return n; - } - - public IEnumerable NodesBeforeSelf () - { - if (Owner == null) - yield break; - for (XNode n = Owner.FirstNode; n != this; n = n.NextNode) - yield return n; - } - - public void ReplaceWith (object content) - { - if (Owner == null) - throw new InvalidOperationException (); - - XNode here = previous; - XNode orgNext = next; - XContainer orgOwner = Owner; - Remove(); - foreach (object o in XUtil.ExpandArray (content)) { - if (o == null || orgOwner.OnAddingObject (o, true, here, false)) - continue; - XNode n = XUtil.ToNode (o); - n = (XNode) XUtil.GetDetachedObject (n); - n.SetOwner (orgOwner); - n.previous = here; - if (here != null) - here.next = n; - else - orgOwner.FirstNode = n; - n.next = orgNext; - if (orgNext != null) - orgNext.previous = n; - else - orgOwner.LastNode = n; - here = n; - } - } - - public void ReplaceWith (params object [] content) - { - if (Owner == null) - throw new InvalidOperationException (); - ReplaceWith ((object) content); - } - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XNodeDocumentOrderComparer.cs b/RestSharp.Net2/System.Xml.Linq/XNodeDocumentOrderComparer.cs deleted file mode 100644 index 8391649bd..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XNodeDocumentOrderComparer.cs +++ /dev/null @@ -1,155 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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; -using System.Collections.Generic; - -namespace System.Xml.Linq -{ - public sealed class XNodeDocumentOrderComparer : IComparer, IComparer - { - public XNodeDocumentOrderComparer () - { - } - - enum CompareResult - { - Same, - Random, - Parent, - Child, - Ancestor, - Descendant, - Preceding, - Following - } - - public int Compare (XNode n1, XNode n2) - { - switch (CompareCore (n1, n2)) { - case CompareResult.Same: - return 0; - case CompareResult.Random: - return DateTime.Now.Ticks % 2 == 1 ? 1 : -1; - case CompareResult.Parent: - case CompareResult.Ancestor: - case CompareResult.Preceding: - return 1; - default: - return -1; - } - } - - CompareResult CompareCore (XNode n1, XNode n2) - { - if (n1 == n2) - return CompareResult.Same; - if (n1.Owner == null) { - if (n2.Owner == null) - // n1 and n2 do not share the same - // top-level node, so return semi- - // random value. - return CompareResult.Random; - - CompareResult result = CompareCore (n1, n2.Owner); - switch (result) { - case CompareResult.Same: - return CompareResult.Child; - case CompareResult.Child: - case CompareResult.Descendant: - return CompareResult.Descendant; - case CompareResult.Parent: - case CompareResult.Ancestor: - throw new Exception ("INTERNAL ERROR: should not happen"); - default: - return result; - } - } - // else - if (n2.Owner == null) { - // do reverse - CompareResult rev = CompareCore (n2, n1); - switch (rev) { - case CompareResult.Parent: - return CompareResult.Child; - case CompareResult.Child: - return CompareResult.Parent; - case CompareResult.Ancestor: - return CompareResult.Descendant; - case CompareResult.Descendant: - return CompareResult.Ancestor; - case CompareResult.Following: - return CompareResult.Preceding; - case CompareResult.Preceding: - return CompareResult.Following; - case CompareResult.Same: - case CompareResult.Random: - return rev; - } - } - // both have parents - CompareResult ret = CompareCore (n1.Owner, n2.Owner); - switch (ret) { - case CompareResult.Same: - // n1 and n2 are sibling each other. - return CompareSibling (n1, n2, CompareResult.Same); - case CompareResult.Child: - return CompareSibling (n1, n2.Owner, CompareResult.Child); - case CompareResult.Parent: - return CompareSibling (n1.Owner, n2, CompareResult.Parent); - case CompareResult.Descendant: - for (XNode i2 = n2; ; i2 = i2.Owner) - if (i2.Owner == n1.Owner) - return CompareSibling (n1, i2, CompareResult.Descendant); - case CompareResult.Ancestor: - for (XNode i1 = n1; ; i1 = i1.Owner) - if (i1.Owner == n2.Owner) - return CompareSibling (i1, n2, CompareResult.Ancestor); - default: - return ret; - } - } - - // results are returned as following/preceding, as it is also - // used for comparing parents. - CompareResult CompareSibling (XNode n1, XNode n2, CompareResult forSameValue) - { - if (n1 == n2) - return forSameValue; - - for (XNode n = n1.NextNode; n != null; n = n.NextNode) - if (n == n2) - return CompareResult.Following; - return CompareResult.Preceding; - } - - int IComparer.Compare (object n1, object n2) - { - return Compare ((XNode) n1, (XNode) n2); - } - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XNodeEqualityComparer.cs b/RestSharp.Net2/System.Xml.Linq/XNodeEqualityComparer.cs deleted file mode 100644 index ccfa7e236..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XNodeEqualityComparer.cs +++ /dev/null @@ -1,187 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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; -using System.Collections.Generic; - -using XPI = System.Xml.Linq.XProcessingInstruction; - -namespace System.Xml.Linq -{ - public sealed class XNodeEqualityComparer : IEqualityComparer, IEqualityComparer - { - public XNodeEqualityComparer () - { - } - - public bool Equals (XNode n1, XNode n2) - { - if (n1 == null) - return n2 == null; - else if (n2 == null) - return false; - //throw new NotImplementedException (); - if (n1.NodeType != n2.NodeType) - return false; - switch (n1.NodeType) { - case XmlNodeType.Document: - XDocument doc1 = (XDocument) n1; - XDocument doc2 = (XDocument) n2; - if (!Equals (doc1.Declaration, doc2.Declaration)) - return false; - IEnumerator id2 = doc2.Nodes ().GetEnumerator (); - foreach (XNode n in doc1.Nodes ()) { - if (!id2.MoveNext ()) - return false; - if (!Equals (n, id2.Current)) - return false; - } - return !id2.MoveNext (); - case XmlNodeType.Element: - XElement e1 = (XElement) n1; - XElement e2 = (XElement) n2; - if (e1.Name != e2.Name) - return false; - IEnumerator ia2 = e2.Attributes ().GetEnumerator (); - foreach (XAttribute n in e1.Attributes ()) { - if (!ia2.MoveNext ()) - return false; - if (!Equals (n, ia2.Current)) - return false; - } - if (ia2.MoveNext ()) - return false; - IEnumerator ie2 = e2.Nodes ().GetEnumerator (); - foreach (XNode n in e1.Nodes ()) { - if (!ie2.MoveNext ()) - return false; - if (!Equals (n, ie2.Current)) - return false; - } - return !ie2.MoveNext (); - case XmlNodeType.Comment: - XComment c1 = (XComment) n1; - XComment c2 = (XComment) n2; - return c1.Value == c2.Value; - case XmlNodeType.ProcessingInstruction: - XPI p1 = (XPI) n1; - XPI p2 = (XPI) n2; - return p1.Target == p2.Target && p1.Data == p2.Data; - case XmlNodeType.DocumentType: - XDocumentType d1 = (XDocumentType) n1; - XDocumentType d2 = (XDocumentType) n2; - return d1.Name == d2.Name && - d1.PublicId == d2.PublicId && - d1.SystemId == d2.SystemId && - d1.InternalSubset == d2.InternalSubset; - case XmlNodeType.Text: - return ((XText) n1).Value == ((XText) n2).Value; - } - throw new Exception ("INTERNAL ERROR: should not happen"); - } - - bool Equals (XAttribute a1, XAttribute a2) - { - if (a1 == null) - return a2 == null; - else if (a2 == null) - return false; - return a1.Name == a2.Name && a1.Value == a2.Value; - } - - bool Equals (XDeclaration d1, XDeclaration d2) - { - if (d1 == null) - return d2 == null; - else if (d2 == null) - return false; - return d1.Version == d2.Version && - d1.Encoding == d2.Encoding && - d1.Standalone == d2.Standalone; - } - - bool IEqualityComparer.Equals (object n1, object n2) - { - return Equals ((XNode) n1, (XNode) n2); - } - - int GetHashCode (XDeclaration d) - { - if (d == null) - return 0; - return (d.Version.GetHashCode () << 7) ^ - (d.Encoding.GetHashCode () << 6) ^ - d.Standalone.GetHashCode (); - } - - public int GetHashCode (XNode node) - { - if (node == null) - return 0; - int h = ((int) node.NodeType << 6); - switch (node.NodeType) { - case XmlNodeType.Document: - XDocument doc = (XDocument) node; - h = h ^ GetHashCode (doc.Declaration); - foreach (XNode n in doc.Nodes ()) - h = h ^ (n.GetHashCode () << 5); - break; - case XmlNodeType.Element: - XElement el = (XElement) node; - h = h ^ (el.Name.GetHashCode () << 3); - foreach (XAttribute a in el.Attributes ()) - h = h ^ (a.GetHashCode () << 7); - foreach (XNode n in el.Nodes ()) - h = h ^ (n.GetHashCode () << 6); - break; - case XmlNodeType.Comment: - h = h ^ ((XComment) node).Value.GetHashCode (); - break; - case XmlNodeType.ProcessingInstruction: - XPI pi = (XPI) node; - h = h ^ ((pi.Target.GetHashCode () << 6) + pi.Data.GetHashCode ()); - break; - case XmlNodeType.DocumentType: - XDocumentType dtd = (XDocumentType) node; - h = h ^ (dtd.Name.GetHashCode () << 7) ^ - (dtd.PublicId.GetHashCode () << 6) ^ - (dtd.SystemId.GetHashCode () << 5) ^ - (dtd.InternalSubset.GetHashCode () << 4); - break; - case XmlNodeType.Text: - h = h ^ (((XText) node).GetHashCode ()); - break; - } - return h; - } - - int IEqualityComparer.GetHashCode (object node) - { - return GetHashCode ((XNode) node); - } - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XNodeNavigator.cs b/RestSharp.Net2/System.Xml.Linq/XNodeNavigator.cs deleted file mode 100644 index b79d362a7..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XNodeNavigator.cs +++ /dev/null @@ -1,422 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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 !MOONLIGHT - -using System; -using System.IO; -using System.Text; -using System.Xml; -using System.Xml.Schema; -using System.Xml.XPath; - -using XPI = System.Xml.Linq.XProcessingInstruction; - -namespace System.Xml.Linq -{ - internal class XNodeNavigator : XPathNavigator - { - static readonly XAttribute attr_ns_xml = new XAttribute (XNamespace.Xmlns.GetName ("xml"), XNamespace.Xml.NamespaceName); - - XNode node; - XAttribute attr; - XmlNameTable name_table; - - public XNodeNavigator (XNode node, XmlNameTable nameTable) - { - this.node = node; - this.name_table = nameTable; - } - - public XNodeNavigator (XNodeNavigator other) - { - this.node = other.node; - this.attr = other.attr; - this.name_table = other.name_table; - } - - public override string BaseURI { - get { return node.BaseUri ?? String.Empty; } - } - - public override bool CanEdit { - get { return true; } - } - - public override bool HasAttributes { - get { - if (attr != null) - return false; - XElement el = node as XElement; - if (el == null) - return false; - foreach (var at in el.Attributes ()) - if (!at.IsNamespaceDeclaration) - return true; - return false; - } - } - - public override bool HasChildren { - get { - if (attr != null) - return false; - XContainer c = node as XContainer; - return c != null && c.FirstNode != null; - } - } - - public override bool IsEmptyElement { - get { - if (attr != null) - return false; - XElement el = node as XElement; - return el != null && el.IsEmpty; - } - } - - public override string LocalName { - get { - switch (NodeType) { - case XPathNodeType.Namespace: - return attr.Name.Namespace == XNamespace.None ? String.Empty : attr.Name.LocalName; - case XPathNodeType.Attribute: - return attr.Name.LocalName; - case XPathNodeType.Element: - return ((XElement) node).Name.LocalName; - case XPathNodeType.ProcessingInstruction: - return ((XPI) node).Target; - default: - return String.Empty; - } - } - } - - public override string Name { - get { - XName name = null; - switch (NodeType) { - case XPathNodeType.Attribute: - name = attr.Name; - break; - case XPathNodeType.Element: - name = ((XElement) node).Name; - break; - default: - return LocalName; - } - if (name.Namespace == XNamespace.None) - return name.LocalName; - XElement el = (node as XElement) ?? node.Parent; - if (el == null) - return name.LocalName; - string prefix = el.GetPrefixOfNamespace (name.Namespace); - return prefix.Length > 0 ? String.Concat (prefix, ":", name.LocalName) : name.LocalName; - } - } - - public override string NamespaceURI { - get { - switch (NodeType) { - case XPathNodeType.ProcessingInstruction: - case XPathNodeType.Namespace: - return String.Empty; - case XPathNodeType.Attribute: - return attr.Name.NamespaceName; - case XPathNodeType.Element: - return ((XElement) node).Name.NamespaceName; - default: - return String.Empty; - } - } - } - - public override XmlNameTable NameTable { - get { return name_table; } - } - - public override XPathNodeType NodeType { - get { - if (attr != null) - return attr.IsNamespaceDeclaration ? - XPathNodeType.Namespace : - XPathNodeType.Attribute; - switch (node.NodeType) { - case XmlNodeType.Element: - return XPathNodeType.Element; - case XmlNodeType.Document: - return XPathNodeType.Root; - case XmlNodeType.Comment: - return XPathNodeType.Comment; - case XmlNodeType.ProcessingInstruction: - return XPathNodeType.ProcessingInstruction; - default: - return XPathNodeType.Text; - } - } - } - - public override string Prefix { - get { - XName name = null; - switch (NodeType) { - case XPathNodeType.ProcessingInstruction: - case XPathNodeType.Namespace: - return String.Empty; - case XPathNodeType.Attribute: - name = attr.Name; - break; - case XPathNodeType.Element: - name = ((XElement) node).Name; - break; - default: - return LocalName; - } - if (name.Namespace == XNamespace.None) - return String.Empty; - XElement el = (node as XElement) ?? node.Parent; - if (el == null) - return String.Empty; - return el.GetPrefixOfNamespace (name.Namespace); - } - } - - public override IXmlSchemaInfo SchemaInfo { - get { return null; } - } - - public override object UnderlyingObject { - get { return attr != null ? (object) attr : node; } - } - - public override string Value { - get { - if (attr != null) - return attr.Value; - else - switch (NodeType) { - case XPathNodeType.Comment: - return ((XComment) node).Value; - case XPathNodeType.ProcessingInstruction: - return ((XPI) node).Data; - case XPathNodeType.Text: - string s = String.Empty; - for (var xn = node as XText; xn != null; xn = xn.NextNode as XText) - s += xn.Value; - return s; - case XPathNodeType.Element: - case XPathNodeType.Root: - return GetInnerText ((XContainer) node); - } - return String.Empty; - } - } - - string GetInnerText (XContainer node) - { - StringBuilder sb = null; - foreach (XNode n in node.Nodes ()) - GetInnerText (n, ref sb); - return sb != null ? sb.ToString () : String.Empty; - } - - void GetInnerText (XNode n, ref StringBuilder sb) - { - switch (n.NodeType) { - case XmlNodeType.Element: - foreach (XNode c in ((XElement) n).Nodes ()) - GetInnerText (c, ref sb); - break; - case XmlNodeType.Text: - case XmlNodeType.CDATA: - if (sb == null) - sb = new StringBuilder (); - sb.Append (((XText) n).Value); - break; - } - } - - public override XPathNavigator Clone () - { - return new XNodeNavigator (this); - } - - public override bool IsSamePosition (XPathNavigator other) - { - XNodeNavigator nav = other as XNodeNavigator; - if (nav == null || nav.node.Owner != node.Owner) - return false; - return node == nav.node && attr == nav.attr; - } - - public override bool MoveTo (XPathNavigator other) - { - XNodeNavigator nav = other as XNodeNavigator; - if (nav == null || nav.node.Document != node.Document) - return false; - node = nav.node; - attr = nav.attr; - return true; - } - - public override bool MoveToFirstAttribute () - { - if (attr != null) - return false; - XElement el = node as XElement; - if (el == null || !el.HasAttributes) - return false; - foreach (XAttribute a in el.Attributes ()) - if (!a.IsNamespaceDeclaration) { - attr = a; - return true; - } - return false; - } - - public override bool MoveToFirstChild () - { - if (attr != null) - return false; - XContainer c = node as XContainer; - if (c == null || c.FirstNode == null) - return false; - node = c.FirstNode; - attr = null; - return true; - } - - public override bool MoveToFirstNamespace (XPathNamespaceScope scope) - { - if (NodeType != XPathNodeType.Element) - return false; - for (XElement el = node as XElement; el != null; el = el.Parent) { - foreach (XAttribute a in el.Attributes ()) - if (a.IsNamespaceDeclaration) { - attr = a; - return true; - } - if (scope == XPathNamespaceScope.Local) - return false; - } - if (scope != XPathNamespaceScope.All) - return false; - attr = attr_ns_xml; - return true; - } - - public override bool MoveToId (string id) - { - throw new NotSupportedException ("This XPathNavigator does not support IDs"); - } - - public override bool MoveToNext () - { - XNode xn = node.NextNode; - if (node is XText) - for (; xn != null; xn = xn.NextNode) - if (!(xn.NextNode is XText)) - break; - if (xn == null) - return false; - node = xn; - attr = null; - return true; - } - - public override bool MoveToNextAttribute () - { - if (attr == null) - return false; - if (attr.NextAttribute == null) - return false; - for (XAttribute a = attr.NextAttribute; a != null; a = a.NextAttribute) - if (!a.IsNamespaceDeclaration) { - attr = a; - return true; - } - return false; - } - - public override bool MoveToNextNamespace (XPathNamespaceScope scope) - { - if (attr == null) - return false; - for (XAttribute a = attr.NextAttribute; a != null; a = a.NextAttribute) - if (a.IsNamespaceDeclaration) { - attr = a; - return true; - } - - if (scope == XPathNamespaceScope.Local) - return false; - - if (attr == attr_ns_xml) - return false; // no next attribute - - for (XElement el = ((XElement) attr.Parent).Parent; el != null; el = el.Parent) { - foreach (XAttribute a in el.Attributes ()) - if (a.IsNamespaceDeclaration) { - attr = a; - return true; - } - } - if (scope != XPathNamespaceScope.All) - return false; - attr = attr_ns_xml; - return true; - } - - public override bool MoveToParent () - { - if (attr != null) { - attr = null; - return true; - } - if (node.Owner == null) - return false; - node = node.Owner; - return true; - } - - public override bool MoveToPrevious () - { - if (node.PreviousNode == null) - return false; - node = node.PreviousNode; - attr = null; - return true; - } - - public override void MoveToRoot () - { - node = node.Document ?? node; - attr = null; - } - } -} - -#endif diff --git a/RestSharp.Net2/System.Xml.Linq/XNodeReader.cs b/RestSharp.Net2/System.Xml.Linq/XNodeReader.cs deleted file mode 100644 index 4a0a3254b..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XNodeReader.cs +++ /dev/null @@ -1,543 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (http://www.novell.com) -// Copyright 2011 Xamarin Inc (http://www.xamarin.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.Xml; - -using XPI = System.Xml.Linq.XProcessingInstruction; - -namespace System.Xml.Linq -{ - internal class XNodeReader : XmlReader, IXmlLineInfo - { - ReadState state = ReadState.Initial; - XNode node, start; - int attr = -1; - bool attr_value; - bool end_element; - NameTable name_table = new NameTable (); - - public XNodeReader (XNode node) - { - this.node = node; - start = node; - } - - int IXmlLineInfo.LineNumber { - get { - var o = (XObject) GetCurrentAttribute () ?? node; - return o != null ? o.LineNumber : 0; - } - } - int IXmlLineInfo.LinePosition { - get { - var o = (XObject) GetCurrentAttribute () ?? node; - return o != null ? o.LinePosition : 0; - } - } - bool IXmlLineInfo.HasLineInfo () - { - var o = (XObject) GetCurrentAttribute () ?? node; - return o != null ? ((IXmlLineInfo) o).HasLineInfo () : false; - } - - public override int AttributeCount { - get { - if (state != ReadState.Interactive || end_element) - return 0; - int i = 0; - switch (node.NodeType) { - case XmlNodeType.Document: // this means xmldecl - XDeclaration xd = ((XDocument) node).Declaration; - i = (xd.Version != null ? 1 : 0) + - (xd.Encoding != null ? 1 : 0) + - (xd.Standalone != null ? 1 : 0); - return i; - case XmlNodeType.DocumentType: - XDocumentType dtd = (XDocumentType) node; - i = (dtd.PublicId != null ? 1 : 0) + - (dtd.SystemId != null ? 1 : 0) + - (dtd.InternalSubset != null ? 1 : 0); - return i; - case XmlNodeType.Element: - XElement el = (XElement) node; - for (XAttribute a = el.FirstAttribute; a != null; a = a.NextAttribute) - i++; - return i; - } - return 0; - } - } - - public override string BaseURI { - get { return node.BaseUri ?? String.Empty; } - } - - public override int Depth { - get { - if (EOF) - return 0; - int i = 0; - // document.Depth = 0, root.Depth = 0, others.Depth = they depend - for (XNode n = node.Parent; n != null; n = n.Parent) - i++; - if (attr >= 0) - i++; - if (attr_value) - i++; - return i; - } - } - - public override bool EOF { - get { return state == ReadState.EndOfFile || state == ReadState.Error; } - } - - public override bool HasAttributes { - get { - if (EOF || end_element || node == null) - return false; - - if (node is XElement) - return ((XElement) node).HasAttributes; - return AttributeCount > 0; - } - } - - public override bool HasValue { - get { - if (EOF) - return false; - if (attr >= 0) - return true; - switch (node.NodeType) { - case XmlNodeType.Element: - case XmlNodeType.Document: - case XmlNodeType.EndElement: - return false; - default: - return true; - } - } - } - - public override bool IsEmptyElement { - get { return !EOF && attr < 0 && node is XElement ? ((XElement) node).IsEmpty : false; } - } - - internal XAttribute GetCurrentAttribute () - { - return GetXAttribute (attr); - } - - XAttribute GetXAttribute (int idx) - { - if (EOF) - return null; - XElement el = node as XElement; - if (el == null) - return null; - int i = 0; - foreach (XAttribute a in el.Attributes ()) - if (i++ == idx) - return a; - return null; - } - - // XName for element and attribute, string for xmldecl attributes, doctype attribute, doctype name and PI, null for empty. - object GetCurrentName () - { - if (EOF || attr_value) - return null; - return GetName (attr); - } - - object GetName (int attr) - { - if (attr >= 0) { - switch (node.NodeType) { - case XmlNodeType.Element: - XAttribute a = GetXAttribute (attr); - return a.Name; - case XmlNodeType.DocumentType: - if (attr == 0) - return ((XDocumentType) node).PublicId != null ? "PUBLIC" : "SYSTEM"; - return "SYSTEM"; - case XmlNodeType.Document: - XDeclaration xd = ((XDocument) node).Declaration; - switch (attr) { - case 0: - return xd.Version != null ? "version" : xd.Encoding != null ? "encoding" : "standalone"; - case 1: - return xd.Version != null ? (xd.Encoding != null ? "encoding" : "standalone") : "standalone"; - } - return "standalone"; - } - } else { - switch (node.NodeType) { - case XmlNodeType.Document: - return "xml"; // xmldecl - case XmlNodeType.Element: - return ((XElement) node).Name; - case XmlNodeType.ProcessingInstruction: - return ((XPI) node).Target; - case XmlNodeType.DocumentType: - return ((XDocumentType) node).Name; - } - } - return null; - } - - public override string LocalName { - get { - object name = GetCurrentName (); - if (name == null) - return String.Empty; - if (name is string) - return (string) name; - return ((XName) name).LocalName; - } - } - - public override string NamespaceURI { - get { - XName name = GetCurrentName () as XName; - if (name != null) - // XName for "xmlns" has NamespaceName as "", so we have to return w3c xmlns as a special case. - return name.LocalName == "xmlns" && name.Namespace == XNamespace.None ? - XNamespace.Xmlns.NamespaceName : - name.NamespaceName; - return String.Empty; - } - } - - public override XmlNameTable NameTable { - get { return name_table; } - } - - public override XmlNodeType NodeType { - get { - return state != ReadState.Interactive ? XmlNodeType.None : - end_element ? XmlNodeType.EndElement : - attr_value ? XmlNodeType.Text : - attr >= 0 ? XmlNodeType.Attribute : - node.NodeType == XmlNodeType.Document ? XmlNodeType.XmlDeclaration : - node.NodeType; - } - } - - public override string Prefix { - get { - XName name = GetCurrentName () as XName; - if (name == null || name.Namespace == XNamespace.None) - return String.Empty; - XElement el = (node as XElement) ?? node.Parent; - if (el == null) - return String.Empty; - return el.GetPrefixOfNamespace (name.Namespace) ?? String.Empty; - } - } - - public override ReadState ReadState { - get { return state; } - } - - public override string Value { - get { - if (ReadState != ReadState.Interactive) - return String.Empty; - XAttribute a = GetCurrentAttribute (); - if (a != null) - return a.Value; - switch (node.NodeType) { - case XmlNodeType.Document: - XDeclaration xd = ((XDocument) node).Declaration; - if (attr >= 0) { - switch (LocalName) { - case "version": - return xd.Version; - case "encoding": - return xd.Encoding; - default: - return xd.Standalone; - } - } else { - string s = xd.ToString (); - return s.Substring (6, s.Length - 6 - 2); - } - case XmlNodeType.DocumentType: - XDocumentType dtd = (XDocumentType) node; - switch (LocalName) { - case "PUBLIC": - return dtd.PublicId; - case "SYSTEM": - return dtd.SystemId; - default: - return dtd.InternalSubset; - } - case XmlNodeType.ProcessingInstruction: - return ((XPI) node).Data; - case XmlNodeType.CDATA: - case XmlNodeType.Text: - return ((XText) node).Value; - case XmlNodeType.Comment: - return ((XComment) node).Value; - } - return String.Empty; - } - } - - public override void Close () - { - state = ReadState.Closed; - } - - public override string LookupNamespace (string prefix) - { - if (EOF) - return null; - XElement el = (node as XElement) ?? node.Parent; - if (el == null) - return null; - var xn = el.GetNamespaceOfPrefix (prefix); - return xn != XNamespace.None ? xn.NamespaceName : null; - } - - public override bool MoveToElement () - { - if (attr >= 0) { - attr_value = false; - attr = -1; - return true; - } - return false; - } - - public override bool MoveToFirstAttribute () - { - if (AttributeCount > 0) { - attr = 0; - attr_value = false; - return true; - } - return false; - } - - public override bool MoveToNextAttribute () - { - int c = AttributeCount; - if (attr + 1 < c) { - attr++; - attr_value = false; - return true; - } - return false; - } - - public override bool MoveToAttribute (string name) - { - if (name == null) - throw new ArgumentNullException ("name"); - - int c = AttributeCount; - bool match = false; - for (int i = 0; i < c; i++) { - object o = GetName (i); - if (o == null) - continue; - if ((o as string) == name) - match = true; - XName n = (XName) o; - if (name.EndsWith (n.LocalName, StringComparison.Ordinal) && name == GetPrefixedName ((XName) o)) - match = true; - if (match) { - attr = i; - attr_value = false; - return true; - } - } - return false; - } - - string GetPrefixedName (XName name) - { - XElement el = (node as XElement) ?? node.Parent; - if (el == null || - name.Namespace == XNamespace.None || - el.GetPrefixOfNamespace (name.Namespace) == String.Empty) - return name.LocalName; - return String.Concat (el.GetPrefixOfNamespace (name.Namespace), ":", name.LocalName); - } - - public override bool MoveToAttribute (string local, string ns) - { - if (local == null) - throw new ArgumentNullException ("local"); - if (ns == null) - throw new ArgumentNullException ("ns"); - - int c = AttributeCount; - bool match = false; - for (int i = 0; i < c; i++) { - object o = GetName (i); - if (o == null) - continue; - if ((o as string) == local && ns.Length == 0) - match = true; - XName n = (XName) o; - if (local == n.LocalName && ns == n.NamespaceName) - match = true; - if (match) { - attr = i; - attr_value = false; - return true; - } - } - return false; - } - - public override string GetAttribute (int i) - { - int a_bak = attr; - bool av_bak = attr_value; - try { - MoveToElement (); - MoveToAttribute (i); - return Value; - } finally { - attr = a_bak; - attr_value = av_bak; - } - } - - public override string GetAttribute (string name) - { - int a_bak = attr; - bool av_bak = attr_value; - try { - MoveToElement (); - return MoveToAttribute (name) ? Value : null; - } finally { - attr = a_bak; - attr_value = av_bak; - } - } - - public override string GetAttribute (string local, string ns) - { - int a_bak = attr; - bool av_bak = attr_value; - try { - MoveToElement (); - return MoveToAttribute (local, ns) ? Value : null; - } finally { - attr = a_bak; - attr_value = av_bak; - } - } - - public override bool Read () - { - // clear attribute state on element/xmldecl/dtd. - attr = -1; - attr_value = false; - - switch (state) { - case ReadState.Initial: - state = ReadState.Interactive; - XDocument doc = node as XDocument; - if (doc != null) { - if (doc.Declaration != null) - return true; - } - else - return true; // any other root - break; - case ReadState.Interactive: - break; - default: - return false; - } - - // when positioned on xmldecl, move to children - if (node is XDocument) { - XDocument doc = node as XDocument; - node = doc.FirstNode; - if (node == null) { - state = ReadState.EndOfFile; - return false; - } - node = doc.FirstNode; - return true; - } - - XElement c = node as XElement; - if (c != null && !end_element) { - if (c.FirstNode != null) { - node = c.FirstNode; - return true; - } else if (!c.IsEmpty) { - // empty but full EndElement - end_element = true; - return true; - } - } - end_element = false; - if (node.NextNode != null && node != start) { - node = node.NextNode; - return true; - } - if (node.Parent == null || node == start) { - state = ReadState.EndOfFile; - return false; - } - node = node.Parent; - end_element = true; - return true; - } - - public - override - bool ReadAttributeValue () - { - if (attr < 0 || attr_value) - return false; - attr_value = true; - return true; - } - - public override void ResolveEntity () - { - throw new NotSupportedException (); - } - - // Note that this does not return attribute node. - internal XNode CurrentNode { - get { return node; } - } - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XNodeWriter.cs b/RestSharp.Net2/System.Xml.Linq/XNodeWriter.cs deleted file mode 100644 index 3ba281f18..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XNodeWriter.cs +++ /dev/null @@ -1,403 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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.Xml; - -namespace System.Xml.Linq -{ - internal class XNodeWriter : XmlWriter - { - public XNodeWriter (XContainer fragment) - { - root = fragment; - state = XmlNodeType.None; - current = fragment; - } - - XContainer root; - bool is_closed; - // If it is not null, then we are now inside the element. - XContainer current; - // If it is not null, then we are now inside the attribute. - XAttribute attribute; - - // None: started or closed. - // XmlDeclaration: after xmldecl. Never allow xmldecl. - // DocumentType: after doctype. Never allow xmldecl and doctype. - // Element: inside document element. - // - XmlNodeType state; - - // Properties - - public override WriteState WriteState { - get { - if (is_closed) - return WriteState.Closed; - if (attribute != null) - return WriteState.Attribute; - - switch (state) { - case XmlNodeType.None: - return WriteState.Start; - case XmlNodeType.XmlDeclaration: - return WriteState.Prolog; - case XmlNodeType.DocumentType: - return WriteState.Element; - default: - return WriteState.Content; - } - } - } - - /* - public override string XmlLang { - get { - for (XElement n = current as XElement; n != null; n = n.Parent as XElement) - if (n.HasAttribute ("xml:lang")) - return n.GetAttribute ("xml:lang"); - return String.Empty; - } - } - - public override XmlSpace XmlSpace { - get { - for (XElement n = current as XElement; n != null; n = n.Parent as XElement) { - string xs = n.GetAttribute ("xml:space"); - switch (xs) { - case "preserve": - return XmlSpace.Preserve; - case "default": - return XmlSpace.Default; - case "": - continue; - default: - throw new InvalidOperationException (String.Format ("Invalid xml:space {0}.", xs)); - } - } - return XmlSpace.None; - } - } - */ - - // Private Methods - - void CheckState () - { - if (is_closed) - throw new InvalidOperationException (); - - } - - void WritePossiblyTopLevelNode (XNode n, bool possiblyAttribute) - { - CheckState (); - if (!possiblyAttribute && attribute != null) - throw new InvalidOperationException (String.Format ("Current state is not acceptable for {0}.", n.NodeType)); - - if (state != XmlNodeType.Element) - root.Add (n); - else if (attribute != null) - attribute.Value += XUtil.ToString (n); - else - current.Add (n); - if (state == XmlNodeType.None) - state = XmlNodeType.XmlDeclaration; - } - - // unlike other XmlWriters the callers must set xmlns - // attribute to overwrite prefix. - void FillXmlns (XElement el, string prefix, XNamespace xns) - { - if (xns == XNamespace.Xmlns) - // do nothing for xmlns attributes - return; - if (prefix == null) - return; - - if (xns == XNamespace.None) - if (el.GetPrefixOfNamespace (xns) != prefix) - el.SetAttributeValue (prefix == String.Empty ? XNamespace.None.GetName ("xmlns") : XNamespace.Xmlns.GetName (prefix), xns.NamespaceName); - else if (el.GetDefaultNamespace () != XNamespace.None) - el.SetAttributeValue (XNamespace.None.GetName ("xmlns"), xns.NamespaceName); - } - - // Public Methods - - public override void Close () - { - CheckState (); - is_closed = true; - } - - public override void Flush () - { - } - - public override string LookupPrefix (string ns) - { - CheckState (); - if (current == null) - throw new InvalidOperationException (); - XElement el = (current as XElement) ?? current.Parent; - return el != null ? el.GetPrefixOfNamespace (XNamespace.Get (ns)) : null; - } - - // StartDocument - - public override void WriteStartDocument () - { - WriteStartDocument (null); - } - - public override void WriteStartDocument (bool standalone) - { - WriteStartDocument (standalone ? "yes" : "no"); - } - - void WriteStartDocument (string sddecl) - { - CheckState (); - if (state != XmlNodeType.None) - throw new InvalidOperationException ("Current state is not acceptable for xmldecl."); - XDocument doc = current as XDocument; - if (doc == null) - throw new InvalidOperationException ("Only document node can accept xml declaration"); - - doc.Declaration = new XDeclaration ("1.0", null, sddecl); - state = XmlNodeType.XmlDeclaration; - } - - // EndDocument - - public override void WriteEndDocument () - { - CheckState (); - - is_closed = true; - } - - // DocumentType - public override void WriteDocType (string name, string publicId, string systemId, string internalSubset) - { - CheckState (); - switch (state) { - case XmlNodeType.None: - case XmlNodeType.XmlDeclaration: - XDocument doc = current as XDocument; - if (doc == null) - throw new InvalidOperationException ("Only document node can accept doctype declaration"); - doc.Add (new XDocumentType (name, publicId, systemId, internalSubset)); - state = XmlNodeType.DocumentType; - break; - default: - throw new InvalidOperationException ("Current state is not acceptable for doctype."); - } - } - - // StartElement - - public override void WriteStartElement (string prefix, string name, string ns) - { - CheckState (); - - XNamespace xns = XNamespace.Get (ns ?? String.Empty); - XElement el = new XElement (xns.GetName (name)); - if (current == null) { - root.Add (el); - state = XmlNodeType.Element; - } else { - current.Add (el); - state = XmlNodeType.Element; - } - - FillXmlns (el, prefix, xns); - - current = el; - } - - // EndElement - - public override void WriteEndElement () - { - WriteEndElementInternal (false); - } - - public override void WriteFullEndElement () - { - WriteEndElementInternal (true); - } - - void WriteEndElementInternal (bool forceFull) - { - CheckState (); - if (current == null) - throw new InvalidOperationException ("Current state is not acceptable for endElement."); - - XElement el = current as XElement; - if (forceFull) - el.IsEmpty = false; - - current = current.Parent; - } - - // StartAttribute - - public override void WriteStartAttribute (string prefix, string name, string ns) - { - CheckState (); - if (attribute != null) - throw new InvalidOperationException ("There is an open attribute."); - XElement el = current as XElement; - if (el == null) - throw new InvalidOperationException ("Current state is not acceptable for startAttribute."); - if (prefix == null) - prefix = String.Empty; - - // special case: in XmlWriter context, xmlns="blah" is - // passeed as localName = "xmlns", ns = w3c_xmlns. - if (prefix.Length == 0 && name == "xmlns" && ns == XNamespace.Xmlns.NamespaceName) - ns = String.Empty; - - XNamespace xns = ns == null ? XNamespace.None : XNamespace.Get (ns); - el.SetAttributeValue (xns.GetName (name), String.Empty); - attribute = el.LastAttribute; - FillXmlns (el, ns != null ? prefix : null, xns); - } - - public override void WriteEndAttribute () - { - CheckState (); - if (attribute == null) - throw new InvalidOperationException ("Current state is not acceptable for startAttribute."); - - attribute = null; - } - - public override void WriteCData (string data) - { - CheckState (); - if (current == null) - throw new InvalidOperationException ("Current state is not acceptable for CDATAsection."); - - current.Add (new XCData (data)); - } - - public override void WriteComment (string comment) - { - WritePossiblyTopLevelNode (new XComment (comment), false); - } - - public override void WriteProcessingInstruction (string name, string value) - { - WritePossiblyTopLevelNode ( - new XProcessingInstruction (name, value), false); - } - - public override void WriteEntityRef (string name) - { - throw new NotSupportedException (); - } - - public override void WriteCharEntity (char c) - { - throw new NotSupportedException (); - } - - public override void WriteWhitespace (string ws) - { - // FIXME: check whitespace - WritePossiblyTopLevelNode (new XText (ws), true); - } - - public override void WriteString (string data) - { - CheckState (); - if (current == null) - throw new InvalidOperationException ("Current state is not acceptable for Text."); - - if (attribute != null) - attribute.Value += data; - else - current.Add (data); - } - - public override void WriteName (string name) - { - WriteString (name); - } - - public override void WriteNmToken (string nmtoken) - { - WriteString (nmtoken); - } - - public override void WriteQualifiedName (string name, string ns) - { - string prefix = LookupPrefix (ns); - if (prefix == null) - throw new ArgumentException (String.Format ("Invalid namespace {0}", ns)); - if (prefix != String.Empty) - WriteString (name); - else - WriteString (prefix + ":" + name); - } - - public override void WriteChars (char [] chars, int start, int len) - { - WriteString (new string (chars, start, len)); - } - - public override void WriteRaw (string data) - { - // It never supports raw string. - WriteString (data); - } - - public override void WriteRaw (char [] chars, int start, int len) - { - // It never supports raw string. - WriteChars (chars, start, len); - } - - public override void WriteBase64 (byte [] data, int start, int len) - { - // It never supports raw string. - WriteString (Convert.ToBase64String (data, start, len)); - } - - public override void WriteBinHex (byte [] data, int start, int len) - { - throw new NotImplementedException (); - } - - public override void WriteSurrogateCharEntity (char c1, char c2) - { - throw new NotImplementedException (); - } - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XObject.cs b/RestSharp.Net2/System.Xml.Linq/XObject.cs deleted file mode 100644 index 1bcf96a78..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XObject.cs +++ /dev/null @@ -1,182 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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.Linq; -using System.Xml; - -namespace System.Xml.Linq -{ - public abstract class XObject : IXmlLineInfo - { - internal XObject () - { - } - - XContainer owner; - List annotations; - string baseuri; - int line, column; - - public event EventHandler Changing; - public event EventHandler Changed; - - public string BaseUri { - get { return baseuri; } - internal set { baseuri = value; } - } - - public XDocument Document { - get { - if (this is XDocument) - return (XDocument) this; - - for (XContainer e = owner; e != null; e = e.owner) - if (e is XDocument) - return (XDocument) e; - return null; - } - } - - public abstract XmlNodeType NodeType { get; } - - public XElement Parent { - get { return owner as XElement; } - } - - internal XContainer Owner { - get { return owner; } - } - - internal void SetOwner (XContainer node) - { - owner = node; - } - - public void AddAnnotation (object annotation) - { - if (annotation == null) - throw new ArgumentNullException ("annotation"); - if (annotations == null) - annotations = new List (); - annotations.Add (annotation); - } - - public T Annotation () where T : class - { - return (T) Annotation (typeof (T)); - } - - public object Annotation (Type type) - { - return Annotations (type).FirstOrDefault (); - } - - public IEnumerable Annotations () where T : class - { - foreach (T o in Annotations (typeof (T))) - yield return o; - } - - public IEnumerable Annotations (Type type) - { - if (type == null) - throw new ArgumentNullException ("type"); - if (annotations == null) - yield break; - foreach (object o in annotations) - if (type.IsAssignableFrom (o.GetType ())) - yield return o; - } - - public void RemoveAnnotations () where T : class - { - RemoveAnnotations (typeof (T)); - } - - public void RemoveAnnotations (Type type) - { - if (annotations == null) - return; - for (int i = 0; i < annotations.Count; i++) - if (type.IsAssignableFrom (annotations [i].GetType ())) - annotations.RemoveAt (i); - } - - internal int LineNumber { - get { return line; } - set { line = value; } - } - - internal int LinePosition { - get { return column; } - set { column = value; } - } - - int IXmlLineInfo.LineNumber { - get { return LineNumber; } - } - - int IXmlLineInfo.LinePosition { - get { return LinePosition; } - } - - bool IXmlLineInfo.HasLineInfo () - { - return line > 0; - } - - internal void FillLineInfoAndBaseUri (XmlReader r, LoadOptions options) - { - if ((options & LoadOptions.SetLineInfo) != LoadOptions.None) { - IXmlLineInfo li = r as IXmlLineInfo; - if (li != null && li.HasLineInfo ()) { - LineNumber = li.LineNumber; - LinePosition = li.LinePosition; - } - } - if ((options & LoadOptions.SetBaseUri) != LoadOptions.None) - BaseUri = r.BaseURI; - } - - internal virtual void OnAddingObject () - { - if (Parent != null) - Parent.OnAddingObject (); - if (Changing != null) - Changing.Invoke (this, null); - } - - internal virtual void OnAddedObject () - { - if (Parent != null) - Parent.OnAddedObject (); - if (Changed != null) - Changed.Invoke (this, null); - } - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XObjectChange.cs b/RestSharp.Net2/System.Xml.Linq/XObjectChange.cs deleted file mode 100644 index 82fdfb29c..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XObjectChange.cs +++ /dev/null @@ -1,36 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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. -// - -namespace System.Xml.Linq -{ - public enum XObjectChange - { - Add, - Remove, - Name, - Value - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XObjectChangeEventArgs.cs b/RestSharp.Net2/System.Xml.Linq/XObjectChangeEventArgs.cs deleted file mode 100644 index 980f45d0e..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XObjectChangeEventArgs.cs +++ /dev/null @@ -1,56 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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.Xml; - -namespace System.Xml.Linq -{ - public class XObjectChangeEventArgs : EventArgs - { - public XObjectChangeEventArgs (XObjectChange change) - { - this.type = change; - } - - // Note that those fields cannot be directly referenced in - // any object comparisons, as there could be other instances. - public static readonly XObjectChangeEventArgs Add = - new XObjectChangeEventArgs (XObjectChange.Add); - public static readonly XObjectChangeEventArgs Name = - new XObjectChangeEventArgs (XObjectChange.Name); - public static readonly XObjectChangeEventArgs Remove = - new XObjectChangeEventArgs (XObjectChange.Remove); - public static readonly XObjectChangeEventArgs Value = - new XObjectChangeEventArgs (XObjectChange.Value); - - public XObjectChange ObjectChange { - get { return type; } - } - - XObjectChange type; - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XProcessingInstruction.cs b/RestSharp.Net2/System.Xml.Linq/XProcessingInstruction.cs deleted file mode 100644 index 8a4d39924..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XProcessingInstruction.cs +++ /dev/null @@ -1,82 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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.Xml; - -namespace System.Xml.Linq -{ - public class XProcessingInstruction : XNode - { - string name; - string data; - - public XProcessingInstruction (string name, string data) - { - if (name == null) - throw new ArgumentNullException ("name"); - if (data == null) - throw new ArgumentNullException ("data"); - this.name = name; - this.data = data; - } - - public XProcessingInstruction (XProcessingInstruction other) - { - if (other == null) - throw new ArgumentNullException ("other"); - this.name = other.name; - this.data = other.data; - } - - public string Data { - get { return data; } - set { - if (value == null) - throw new ArgumentNullException ("value"); - this.data = value; - } - } - - public override XmlNodeType NodeType { - get { return XmlNodeType.ProcessingInstruction; } - } - - public string Target { - get { return name; } - set { - if (value == null) - throw new ArgumentNullException ("value"); - name = value; - } - } - - public override void WriteTo (XmlWriter w) - { - w.WriteProcessingInstruction (name, data); - } - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XStreamingElement.cs b/RestSharp.Net2/System.Xml.Linq/XStreamingElement.cs deleted file mode 100644 index 1c45409b4..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XStreamingElement.cs +++ /dev/null @@ -1,184 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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.IO; -using System.Collections.Generic; - -namespace System.Xml.Linq -{ - public class XStreamingElement - { - public XStreamingElement (XName name) - { - Name = name; - } - - public XStreamingElement (XName name, object content) - : this (name) - { - Add (content); - } - - public XStreamingElement (XName name, params object [] content) - : this (name) - { - Add (content); - } - - XName name; - List contents; - - public XName Name { - get { return name; } - set { name = value; } - } - - internal IEnumerable Contents { - get { return contents; } - } - - public void Add (object content) - { - if (contents == null) - contents = new List (); - contents.Add (content); - } - - public void Add (params object [] content) - { - if (contents == null) - contents = new List (); - contents.Add (content); - } - - public void Save (string fileName) - { - using (TextWriter w = File.CreateText (fileName)) - Save (w, SaveOptions.None); - } - - public void Save (TextWriter textWriter) - { - Save (textWriter, SaveOptions.None); - } - - public void Save (XmlWriter writer) - { - WriteTo (writer); - } - - public void Save (string fileName, SaveOptions options) - { - using (TextWriter w = File.CreateText (fileName)) - Save (w, options); - } - - public void Save (TextWriter textWriter, SaveOptions options) - { - XmlWriterSettings s = new XmlWriterSettings (); - s.OmitXmlDeclaration = true; - - if ((options & SaveOptions.DisableFormatting) == SaveOptions.None) - s.Indent = true; -#if NET_4_0 - if ((options & SaveOptions.OmitDuplicateNamespaces) == SaveOptions.OmitDuplicateNamespaces) - s.NamespaceHandling |= NamespaceHandling.OmitDuplicates; -#endif - using (XmlWriter w = XmlWriter.Create (textWriter, s)) - WriteTo (w); - } - -#if NET_4_0 - public void Save (Stream stream) - { - Save (stream, SaveOptions.None); - } - - public void Save (Stream stream, SaveOptions options) - { - XmlWriterSettings s = new XmlWriterSettings (); - if ((options & SaveOptions.DisableFormatting) == SaveOptions.None) - s.Indent = true; - if ((options & SaveOptions.OmitDuplicateNamespaces) == SaveOptions.OmitDuplicateNamespaces) - s.NamespaceHandling |= NamespaceHandling.OmitDuplicates; - - using (var writer = XmlWriter.Create (stream, s)){ - WriteTo (writer); - } - } -#endif - - public override string ToString () - { - return ToString (SaveOptions.None); - } - - public string ToString (SaveOptions options) - { - StringWriter sw = new StringWriter (); - Save (sw, options); - return sw.ToString (); - } - - public void WriteTo (XmlWriter writer) - { - writer.WriteStartElement (name.LocalName, name.Namespace.NamespaceName); - WriteContents (contents, writer); - writer.WriteEndElement (); - } - - void WriteContents (IEnumerable items, XmlWriter w) - { - foreach (object o in XUtil.ExpandArray (items)) { - if (o == null) - continue; - else if (o is XStreamingElement) - ((XStreamingElement) o).WriteTo (w); - else if (o is XNode) - ((XNode) o).WriteTo (w); - else if (o is object []) - WriteContents ((object []) o, w); - else if (o is XAttribute) - WriteAttribute ((XAttribute) o, w); - else - new XText (o.ToString ()).WriteTo (w); - } - } - - void WriteAttribute (XAttribute a, XmlWriter w) - { - if (a.IsNamespaceDeclaration) { - if (a.Name.Namespace == XNamespace.Xmlns) - w.WriteAttributeString ("xmlns", a.Name.LocalName, XNamespace.Xmlns.NamespaceName, a.Value); - else - w.WriteAttributeString ("xmlns", a.Value); - } - else - w.WriteAttributeString (a.Name.LocalName, a.Name.Namespace.NamespaceName, a.Value); - } - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XText.cs b/RestSharp.Net2/System.Xml.Linq/XText.cs deleted file mode 100644 index 4ad1b25bf..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XText.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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.IO; -using System.Linq; -using System.Text; -using System.Xml; - -namespace System.Xml.Linq -{ - public class XText : XNode - { - string value; - - public XText (string value) - { - this.value = value; - } - - public XText (XText other) - { - value = other.value; - } - - public override XmlNodeType NodeType { - get { return XmlNodeType.Text; } - } - - public string Value { - get { return value; } - set { - if (value == null) - throw new ArgumentNullException ("value"); - this.value = value; - } - } - - public override void WriteTo (XmlWriter w) - { - if (Value.Length > 0 && Value.All (c => c == ' ' || c == '\t' || c == '\r' || c == '\n')) - w.WriteWhitespace (value); - else - w.WriteString (value); - } - } -} diff --git a/RestSharp.Net2/System.Xml.Linq/XUtil.cs b/RestSharp.Net2/System.Xml.Linq/XUtil.cs deleted file mode 100644 index 69cb484b2..000000000 --- a/RestSharp.Net2/System.Xml.Linq/XUtil.cs +++ /dev/null @@ -1,152 +0,0 @@ -// -// Authors: -// Atsushi Enomoto -// -// Copyright 2007 Novell (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 -// "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; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Text; -using System.Xml; - -using XPI = System.Xml.Linq.XProcessingInstruction; - -namespace System.Xml.Linq -{ - internal static class XUtil - { - public const string XmlnsNamespace = - "http://www.w3.org/2000/xmlns/"; - - public static bool ConvertToBoolean (string s) - { - return XmlConvert.ToBoolean (s.ToLower (CultureInfo.InvariantCulture)); - } - - public static DateTime ToDateTime (string s) - { - try { - return XmlConvert.ToDateTime (s, XmlDateTimeSerializationMode.RoundtripKind); - } catch { - return DateTime.Parse (s); - } - } - - public static string ToString (object o) - { - if (o == null) - throw new InvalidOperationException ("Attempt to get string from null"); - - switch (Type.GetTypeCode (o.GetType ())) { - case TypeCode.String: - return (string) o; - case TypeCode.DateTime: - return XmlConvert.ToString ((DateTime) o, XmlDateTimeSerializationMode.RoundtripKind); - case TypeCode.Decimal: - return ((decimal) o).ToString (CultureInfo.InvariantCulture); - case TypeCode.Double: - return ((double) o).ToString ("r", CultureInfo.InvariantCulture); - case TypeCode.Single: - return ((float) o).ToString ("r", CultureInfo.InvariantCulture); - case TypeCode.Boolean: - // Valid XML values are `true' and `false', not `True' and `False' that boolean returns - return o.ToString().ToLower(); - default: - if (o is TimeSpan) - return XmlConvert.ToString ((TimeSpan) o); - if (o is DateTimeOffset) - return XmlConvert.ToString ((DateTimeOffset) o); - return o.ToString (); - } - } - - public static bool ToBoolean (object o) - { - throw new NotImplementedException (); - } - - public static Nullable ToNullableBoolean (object o) - { - throw new NotImplementedException (); - } - - public static IEnumerable ExpandArray (object o) - { - XNode n = o as XNode; - if (n != null) - yield return n; - else if (o is string) - yield return o; - else if (o is IEnumerable) - foreach (object obj in (IEnumerable) o) - foreach (object oo in ExpandArray (obj)) - yield return oo; - else - yield return o; - } - - public static XNode ToNode (object o) - { - if (o is XAttribute) - throw new ArgumentException ("Attribute node is not allowed as argument"); - XNode n = o as XNode; - if (n != null) - return n; - else if (o is string) - return new XText ((string) o); - else - return new XText (ToString (o)); - } - - public static object GetDetachedObject (XObject child) - { - return child.Owner != null ? Clone (child) : child; - } - - public static object Clone (object o) - { - if (o is string) - return (string) o; - if (o is XAttribute) - return new XAttribute ((XAttribute) o); - if (o is XElement) - return new XElement ((XElement) o); - if (o is XCData) - return new XCData ((XCData) o); - if (o is XComment) - return new XComment ((XComment) o); - if (o is XPI) - return new XPI ((XPI) o); - if (o is XDeclaration) - return new XDeclaration ((XDeclaration) o); - if (o is XDocumentType) - return new XDocumentType ((XDocumentType) o); - if (o is XText) - return new XText ((XText) o); - throw new ArgumentException (); - } - } -} diff --git a/RestSharp.Net2/packages.config b/RestSharp.Net2/packages.config index a38ae403b..2f7115bd2 100644 --- a/RestSharp.Net2/packages.config +++ b/RestSharp.Net2/packages.config @@ -1,4 +1,4 @@  - - \ No newline at end of file + + diff --git a/RestSharp.Tests/RestSharp.Tests.csproj b/RestSharp.Tests/RestSharp.Tests.csproj index 2d186bf89..2f4f73b70 100644 --- a/RestSharp.Tests/RestSharp.Tests.csproj +++ b/RestSharp.Tests/RestSharp.Tests.csproj @@ -10,7 +10,7 @@ Properties RestSharp.Tests RestSharp.Tests - v4.0 + v4.8 512 @@ -53,9 +53,9 @@ bin\Release\RestSharp.Tests.xml - + False - ..\packages\Newtonsoft.Json.4.0.8\lib\net40\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll @@ -64,17 +64,21 @@ - + False - ..\packages\xunit.1.9.0.1566\lib\xunit.dll + ..\packages\xunit.abstractions.2.0.3\lib\net35\xunit.abstractions.dll - + False - ..\packages\xunit.extensions.1.9.0.1566\lib\xunit.extensions.dll + ..\packages\xunit.assert.2.4.2\lib\netstandard1.1\xunit.assert.dll - + False - ..\packages\xunit.1.8.0.1545\lib\xunit.runner.tdnet.dll + ..\packages\xunit.extensibility.core.2.4.2\lib\net452\xunit.core.dll + + + False + ..\packages\xunit.extensibility.execution.2.4.2\lib\net452\xunit.execution.desktop.dll @@ -155,19 +159,19 @@ - + False - .NET Framework 3.5 SP1 Client Profile + .NET Framework 3.5 SP1 false - + False - .NET Framework 3.5 SP1 + Microsoft .NET Framework 4.8 %28x86 and x64%29 true - + False - Windows Installer 3.1 + Windows Installer 4.5 true diff --git a/RestSharp.Tests/packages.config b/RestSharp.Tests/packages.config index fae2c0461..600dc2e4c 100644 --- a/RestSharp.Tests/packages.config +++ b/RestSharp.Tests/packages.config @@ -1,6 +1,12 @@  - - - - \ No newline at end of file + + + + + + + + + + diff --git a/RestSharp.sln b/RestSharp.sln index d505eaa47..ba22d0cc6 100644 --- a/RestSharp.sln +++ b/RestSharp.sln @@ -1,6 +1,6 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RestSharp", "RestSharp\RestSharp.csproj", "{2ECECFBF-5F3E-40EE-A963-72336DC7ABE2}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RestSharp.Tests", "RestSharp.Tests\RestSharp.Tests.csproj", "{1464E4AC-18BB-4F23-8A0B-68196F9E1871}" diff --git a/RestSharp/Extensions/StringExtensions.cs b/RestSharp/Extensions/StringExtensions.cs index 869c4384c..4d8a74a95 100644 --- a/RestSharp/Extensions/StringExtensions.cs +++ b/RestSharp/Extensions/StringExtensions.cs @@ -22,10 +22,6 @@ using System.Text.RegularExpressions; using System.Globalization; -#if Net2 -using RestSharp.Contrib; -#endif - #if SILVERLIGHT using System.Windows.Browser; #endif diff --git a/RestSharp/RestSharp.csproj b/RestSharp/RestSharp.csproj index 9e64a9b0a..ea6bf33cf 100644 --- a/RestSharp/RestSharp.csproj +++ b/RestSharp/RestSharp.csproj @@ -10,7 +10,7 @@ Properties RestSharp RestSharp - v3.5 + v4.8 512 @@ -31,7 +31,6 @@ false false true - Client true @@ -57,18 +56,12 @@ False - ..\packages\Newtonsoft.Json.4.5.1\lib\net35\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll - - 3.5 - - - 3.5 - - - 3.5 - + + + @@ -163,24 +156,23 @@ - + False - .NET Framework 3.5 SP1 Client Profile + .NET Framework 3.5 SP1 false - + False - .NET Framework 3.5 SP1 + Microsoft .NET Framework 4.8 %28x86 and x64%29 true - + False - Windows Installer 3.1 + Windows Installer 4.5 true - + + + diff --git a/packages/xunit.core.2.4.2/build/xunit.core.targets b/packages/xunit.core.2.4.2/build/xunit.core.targets new file mode 100755 index 000000000..953b808a2 --- /dev/null +++ b/packages/xunit.core.2.4.2/build/xunit.core.targets @@ -0,0 +1,21 @@ + + + + + + true + full + true + + + + + portable + true + true + + + + + + diff --git a/packages/xunit.core.2.4.2/buildMultiTargeting/xunit.core.props b/packages/xunit.core.2.4.2/buildMultiTargeting/xunit.core.props new file mode 100755 index 000000000..59fd2324b --- /dev/null +++ b/packages/xunit.core.2.4.2/buildMultiTargeting/xunit.core.props @@ -0,0 +1,16 @@ + + + + + + + + + true + true + + + + + + diff --git a/packages/xunit.core.2.4.2/buildMultiTargeting/xunit.core.targets b/packages/xunit.core.2.4.2/buildMultiTargeting/xunit.core.targets new file mode 100755 index 000000000..953b808a2 --- /dev/null +++ b/packages/xunit.core.2.4.2/buildMultiTargeting/xunit.core.targets @@ -0,0 +1,21 @@ + + + + + + true + full + true + + + + + portable + true + true + + + + + + diff --git a/packages/xunit.core.2.4.2/xunit.core.2.4.2.nupkg b/packages/xunit.core.2.4.2/xunit.core.2.4.2.nupkg new file mode 100755 index 000000000..b32722ff9 Binary files /dev/null and b/packages/xunit.core.2.4.2/xunit.core.2.4.2.nupkg differ diff --git a/packages/xunit.extensibility.core.2.4.2/.signature.p7s b/packages/xunit.extensibility.core.2.4.2/.signature.p7s new file mode 100755 index 000000000..e44ff7add Binary files /dev/null and b/packages/xunit.extensibility.core.2.4.2/.signature.p7s differ diff --git a/packages/xunit.extensibility.core.2.4.2/_content/logo-128-transparent.png b/packages/xunit.extensibility.core.2.4.2/_content/logo-128-transparent.png new file mode 100755 index 000000000..9a8896bc0 Binary files /dev/null and b/packages/xunit.extensibility.core.2.4.2/_content/logo-128-transparent.png differ diff --git a/packages/xunit.extensibility.core.2.4.2/lib/net452/xunit.core.dll b/packages/xunit.extensibility.core.2.4.2/lib/net452/xunit.core.dll new file mode 100755 index 000000000..2969fc9c2 Binary files /dev/null and b/packages/xunit.extensibility.core.2.4.2/lib/net452/xunit.core.dll differ diff --git a/packages/xunit.extensibility.core.2.4.2/lib/net452/xunit.core.dll.tdnet b/packages/xunit.extensibility.core.2.4.2/lib/net452/xunit.core.dll.tdnet new file mode 100755 index 000000000..1537c03e0 --- /dev/null +++ b/packages/xunit.extensibility.core.2.4.2/lib/net452/xunit.core.dll.tdnet @@ -0,0 +1,5 @@ + + xUnit.net {0}.{1}.{2} + xunit.runner.tdnet.dll + Xunit.Runner.TdNet.TdNetRunner + diff --git a/packages/xunit.extensibility.core.2.4.2/lib/net452/xunit.core.xml b/packages/xunit.extensibility.core.2.4.2/lib/net452/xunit.core.xml new file mode 100755 index 000000000..34ffbbfc2 --- /dev/null +++ b/packages/xunit.extensibility.core.2.4.2/lib/net452/xunit.core.xml @@ -0,0 +1,1255 @@ + + + + xunit.core + + + + + Attribute used to decorate an assembly with arbitrary name/value pairs ("traits"). + + + + + Creates a new instance of the class. + + The trait name + The trait value + + + + Provides a data source for a data theory, with the data coming from a class + which must implement IEnumerable<object[]>. + Caution: the property is completely enumerated by .ToList() before any test is run. Hence it should return independent object sets. + + + + + Initializes a new instance of the class. + + The class that provides the data. + + + + Gets the type of the class that provides the data. + + + + + + + + Used to declare a specific test collection for a test class. + + + + + Initializes a new instance of the class. + + The test collection name. + + + + Defines the built-in behavior types for collections in xUnit.net. + + + + + By default, generates a collection per assembly, and any test classes that are not + decorated with will be placed into the assembly-level + collection. + + + + + By default, generates a collection per test class for any test classes that are not + decorated with . + + + + + Used to declare the default test collection behavior for the assembly. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The collection behavior for the assembly. + + + + Initializes a new instance of the class. + + The type name of the test collection factory (that implements ). + The assembly that exists in. + + + + Determines whether tests in this assembly are run in parallel. + + + + + Determines how many tests can run in parallel with each other. If set to 0, the system will + use . If set to a negative number, then there will + be no limit to the number of threads. + + + + + Used to declare a test collection container class. The container class gives + developers a place to attach interfaces like and + that will be applied to all tests classes + that are members of the test collection. + + + + + Initializes a new instance of the class. + + The test collection name. + + + + Determines whether tests in this collection runs in parallel with any other collections. + + + + + + + + + + + + + + Attribute that is applied to a method to indicate that it is a fact that should be run + by the test runner. It can also be extended to support a customized definition of a + test method. + + + + + Gets the name of the test to be used when the test is skipped. Defaults to + null, which will cause the fully qualified test name to be used. + + + + + Marks the test so that it will not be run, and gets or sets the skip reason + + + + + Marks the test as having a timeout, and gets or sets the timeout (in milliseconds). + WARNING: Using this with parallelization turned on will result in undefined behavior. + Timeout is only supported when parallelization is disabled, either globally or with + a parallelization-disabled test collection. + + + + + Used to provide asynchronous lifetime functionality. Currently supported: + - Test classes + - Classes used in + - Classes used in . + + + + + Called immediately after the class has been created, before it is used. + + + + + Called when an object is no longer needed. Called just before + if the class also implements that. + + + + + Used to decorate xUnit.net test classes and collections to indicate a test which has + per-test-class fixture data. An instance of the fixture data is initialized just before + the first test in the class is run, and if it implements IDisposable, is disposed + after the last test in the class is run. To gain access to the fixture data from + inside the test, a constructor argument should be added to the test class which + exactly matches the . Class fixtures must have a + single parameterless constructor, and may take collection fixture types as constructor + arguments. + + The type of the fixture. + + If asynchronous setup of is required + it should implement the interface. + + + + + Used to decorate xUnit.net test classes and collections to indicate a test which has + per-test-collection fixture data. An instance of the fixture data is initialized just before + the first test in the collection is run, and if it implements IDisposable, is disposed + after the last test in the collection is run. To gain access to the fixture data from + inside the test, a constructor argument should be added to the test class which + exactly matches the . + + The type of the fixture. + + If asynchronous setup of is required + it should implement the interface. + + + + + Provides a data source for a data theory, with the data coming from inline values. + + + + + Initializes a new instance of the class. + + The data values to pass to the theory. + + + + + + + A class implements this interface to participate in ordering tests + for the test runner. Test collection orderers are applied using the + , which can be applied at + the assembly level. + + + + + Orders test collections for execution. + + The test collections to be ordered. + The test collections in the order to be run. + + + + Provides a data source for a data theory, with the data coming from one of the following sources: + 1. A static property + 2. A static field + 3. A static method (with parameters) + The member must return something compatible with IEnumerable<object[]> with the test data. + Caution: the property is completely enumerated by .ToList() before any test is run. Hence it should return independent object sets. + + + + + Initializes a new instance of the class. + + The name of the public static member on the test class that will provide the test data + The parameters for the member (only supported for methods; ignored for everything else) + + + + + + + Provides a base class for attributes that will provide member data. The member data must return + something compatible with . + Caution: the property is completely enumerated by .ToList() before any test is run. Hence it should return independent object sets. + + + + + Initializes a new instance of the class. + + The name of the public static member on the test class that will provide the test data + The parameters for the member (only supported for methods; ignored for everything else) + + + + Returns true if the data attribute wants to skip enumerating data during discovery. + This will cause the theory to yield a single test case for all data, and the data discovery + will be during test execution instead of discovery. + + + + + Gets the member name. + + + + + Gets or sets the type to retrieve the member from. If not set, then the property will be + retrieved from the unit test class. + + + + + Gets or sets the parameters passed to the member. Only supported for static methods. + + + + + + + + Converts an item yielded by the data member to an object array, for return from . + + The method that is being tested. + An item yielded from the data member. + An suitable for return from . + + + + Allows the user to record actions for a test. + + + + + Records any exception which is thrown by the given code. + + The code which may throw an exception. + Returns the exception that was thrown by the code; null, otherwise. + + + + Records any exception which is thrown by the given code that has + a return value. Generally used for testing property accessors. + + The code which may throw an exception. + Returns the exception that was thrown by the code; null, otherwise. + + + + + + + Records any exception which is thrown by the given task. + + The task which may throw an exception. + Returns the exception that was thrown by the code; null, otherwise. + + + + + + + The implementation of which returns the trait values + for . + + + + + + + + Base attribute which indicates a test method interception (allows code to be run before and + after the test is run). + + + + + This method is called after the test method is executed. + + The method under test + + + + This method is called before the test method is executed. + + The method under test + + + + Abstract attribute which represents a data source for a data theory. + Data source providers derive from this attribute and implement GetData + to return the data for the theory. + Caution: the property is completely enumerated by .ToList() before any test is run. Hence it should return independent object sets. + + + + + Returns the data to be used to test the theory. + + The method that is being tested + One or more sets of theory data. Each invocation of the test method + is represented by a single object array. + + + + Marks all test cases generated by this data source as skipped. + + + + + Default implementation of . Uses reflection to find the + data associated with ; may return null when called + without reflection-based abstraction implementations. + + + + + + + + + + + An attribute used to decorate classes which derive from , + to indicate how data elements should be discovered. + + + + + Initializes an instance of . + + The fully qualified type name of the discoverer + (f.e., 'Xunit.Sdk.DataDiscoverer') + The name of the assembly that the discoverer type + is located in, without file extension (f.e., 'xunit.execution') + + + + Aggregates exceptions. Intended to run one or more code blocks, and collect the + exceptions thrown by those code blocks. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class that + contains the exception list of its parent. + + The parent aggregator to copy exceptions from. + + + + Returns true if the aggregator has at least one exception inside it. + + + + + Adds an exception to the aggregator. + + The exception to be added. + + + + Adds exceptions from another aggregator into this aggregator. + + The aggregator whose exceptions should be copied. + + + + Clears the aggregator. + + + + + Runs the code, catching the exception that is thrown and adding it to + the aggregate. + + The code to be run. + + + + Runs the code, catching the exception that is thrown and adding it to + the aggregate. + + The code to be run. + + + + Runs the code, catching the exception that is thrown and adding it to + the aggregate. + + The code to be run. + + + + Returns an exception that represents the exceptions thrown by the code + passed to the or method. + + Returns null if no exceptions were thrown; returns the + exact exception if a single exception was thrown; returns + if more than one exception was thrown. + + + + This class is responsible for discovering the data available in an implementation + of . The discovery process may not always have access + to reflection (i.e., running in Resharper), so the discoverer must make a best + effort to return data, but may return null when there is not enough information + available (for example, if reflection is required to answer the question). + + + + + Returns the data to be used to test the theory. + + + This will be called during + discovery, at which point the may or may not + be backed by reflection (i.e., implementing ). + If the data is not available because reflection is required, then you may return + null to inform xUnit that the quantity of data is unknown at this point. + When the tests are run, if you returned back null during discovery, then this method + will be called again to retrieve the data, this time guaranteed to provide + an implementation of . At this time, you + must return the actual data, and returning null is not legal. + + The data attribute being discovered + The method that is being tested/discovered + The theory data (or null during discovery, if not enough + information is available to enumerate the data) + + + + Returns true if the data attribute supports enumeration during + discovery; false otherwise. Data attributes with expensive computational + costs and/or randomized data sets should return false. + + + + + Used by discovery, execution, and extensibility code to send messages to the runner. + + + + + Queues a message to be sent to the runner. + + The message to be sent to the runner + + Returns true if discovery/execution should continue; false, otherwise. + The return value may be safely ignored by components which are not directly responsible + for discovery or execution, and this is intended to communicate to those sub-systems that + that they should short circuit and stop their work as quickly as is reasonable. + + + + + Implementation of used to discover the data + provided by . + + + + + + + + + + + A class implements this interface to participate in ordering tests + for the test runner. Test case orderers are applied using the + , which can be applied at + the assembly, test collection, and test class level. + + + + + Orders test cases for execution. + + The test cases to be ordered. + The test cases in the order to be run. + + + + Marker interface that must be implemented by test framework attributes, so + that the test framework attribute discoverer can find them. + + + + + Interface to be implemented by classes which are used to discover the test framework. + + + + + Gets the type that implements to be used to discover + and run tests. + + The test framework attribute that decorated the assembly + The test framework type + + + + Marker interface used by attributes which provide trait data. + + + + + This interface is implemented by discoverers that provide trait values to + xUnit.net v2 tests. + + + + + Gets the trait values from the trait attribute. + + The trait attribute containing the trait values. + The trait values. + + + + Represents a single test case from xUnit.net v2. + + + + + Gets the exception that happened during initialization. When this is set, then + the test execution should fail with this exception. + + + + + Gets the method to be run. Differs from . in that + any generic argument types will have been closed based on the arguments. + + + + + Gets the timeout of the test, in milliseconds; if zero or negative, means the test case has no timeout. + + + + + Executes the test case, returning 0 or more result messages through the message sink. + + The message sink used to send diagnostic messages to. + The message bus to report results to. + The arguments to pass to the constructor. + The error aggregator to use for catching exception. + The cancellation token source that indicates whether cancellation has been requested. + Returns the summary of the test case run. + + + + Interface to be implemented by classes which are used to discover tests cases attached + to test methods that are attributed with (or a subclass). + + + + + Discover test cases from a test method. + + The discovery options to be used. + The test method the test cases belong to. + The fact attribute attached to the test method. + Returns zero or more test cases represented by the test method. + + + + This interface is intended to be implemented by components which generate test collections. + End users specify the desired test collection factory by applying + at the assembly level. Classes which implement this interface must have a constructor + that takes and . + + + + + Gets the display name for the test collection factory. This information is shown to the end + user as part of the description of the test environment. + + + + + Gets the test collection for a given test class. + + The test class. + The test collection. + + + + Implementation of for discovering . + + + + + + + + Marks an assembly as a platform specific assembly for use with xUnit.net. Type references from + such assemblies are allowed to use a special suffix ("My.Assembly.{Platform}"), which will + automatically be translated into the correct platform-specific name ("My.Assembly.desktop", + "My.Assembly.win8", etc.). This affects both extensibility points which require specifying + a string-based type name and assembly, as well as serialization. + + In v2.1 and later, the supported platform target names include: + + "desktop" (for desktop and PCL tests), + "dotnet" (everything else). + + In v2.0, the following names were also supported: + + "iOS-Universal" (for Xamarin test projects targeting iOS), + "MonoAndroid" (for Xamarin MonoAndroid tests), + "MonoTouch" (for Xamarin MonoTouch tests), + "universal" (for Windows Phone 8.1 and Windows 8.1 tests), + "win8" (for Windows 8 tests), + "wp8" (for Windows Phone 8 Silverlight tests). + + For backward compatibility reasons, the v2.1 runners will support tests linked against + the v2.0 execution libraries. + + Note that file names may be case sensitive (when running on platforms with case sensitive + file systems like Linux), so ensure that your assembly file name casing is consistent, and + that you use the suffixes here with the exact case shown. + + + + + Represents the statistical summary from a run of one or more tests. + + + + + The total number of tests run. + + + + + The number of failed tests. + + + + + The number of skipped tests. + + + + + The total time taken to run the tests, in seconds. + + + + + Adds a run summary's totals into this run summary. + + The run summary to be added. + + + + Decorates an implementation of that is used to + determine which test framework is used to discover and run tests. + + + + + Initializes an instance of . + + The fully qualified type name of the discoverer + (f.e., 'Xunit.Sdk.DataDiscoverer') + The name of the assembly that the discoverer type + is located in, without file extension (f.e., 'xunit.execution') + + + + The implementation of which returns the trait values + for . + + + + + + + + An attribute used to decorate classes which implement , + to indicate how trait values should be discovered. The discoverer type must implement + . + + + + + Initializes an instance of . + + The fully qualified type name of the discoverer + (f.e., 'Xunit.Sdk.TraitDiscoverer') + The name of the assembly that the discoverer type + is located in, without file extension (f.e., 'xunit.execution') + + + + An attribute used to decorate classes which derive from , + to indicate how test cases should be discovered. + + + + + Initializes an instance of the class. + + The fully qualified type name of the discoverer + (f.e., 'Xunit.Sdk.FactDiscoverer') + The name of the assembly that the discoverer type + is located in, without file extension (f.e., 'xunit.execution') + + + + Indicates the default display name format for test methods. + + + + + Use a fully qualified name (namespace + class + method) + + + + + Use just the method name (without class) + + + + + Indicates the method display options for test methods. + + + + + Indicates no additional method display options. + + This is the default configuration option. + + + + Replace underscores in display names with a space. + + + + + Replace well-known monikers with their equivalent operator. + + + lt : < + le : <= + eq : = + ne : != + gt : > + ge : >= + + + + + Replace supported escape sequences with their equivalent character. + + + Encoding + Format + + ASCIIX hex-digit hex-digit (ex: X2C) + UnicodeU hex-digit hex-digit hex-digit hex-digit (ex: U00A9) + + + + + + Replaces the period delimiter used in namespace and type references with a comma. + + This option is only honored if the setting is also enabled. + + + + Enables all method display options. + + + + + Formats arguments for display in theories. + + + + + Format the value for presentation. + + The value to be formatted. + + + The formatted value. + + + + Format the value for presentation. + + The value to be formatted. + + The formatted value. + + + + Default implementation of used by the xUnit.net equality assertions. + + The type that is being compared. + + + + Initializes a new instance of the class. + + The inner comparer to be used when the compared objects are enumerable. + + + + + + + + + + + + + A class that wraps to create . + + The type that is being compared. + + + + Initializes a new instance of the class. + + The comparer that is being adapted. + + + + + + + + + + Used to decorate an assembly, test collection, or test class to allow + the use of a custom . + + + + + Initializes a new instance of the class. + + The type name of the orderer class (that implements ). + The assembly that exists in. + + + + Used to decorate an assembly to allow the use of a custom . + + + + + Initializes a new instance of the class. + + The type name of the orderer class (that implements ). + The assembly that exists in. + + + + Used to decorate an assembly to allow the use of a custom . + + + + + Initializes an instance of . + + The fully qualified type name of the test framework + (f.e., 'Xunit.Sdk.XunitTestFramework') + The name of the assembly that the test framework type + is located in, without file extension (f.e., 'xunit.execution') + + + + Marks a test method as being a data theory. Data theories are tests which are fed + various bits of data from a data source, mapping to parameters on the test method. + If the data source contains multiple rows, then the test method is executed + multiple times (once with each data row). Data is provided by attributes which + derive from (notably, and + ). + + + + + Provides data for theories based on collection initialization syntax. + + + + + Adds a row to the theory. + + The values to be added. + + + + + + + + + + Represents a set of data for a theory with a single parameter. Data can + be added to the data set using the collection initializer syntax. + + The parameter type. + + + + Adds data to the theory data set. + + The data value. + + + + Represents a set of data for a theory with 2 parameters. Data can + be added to the data set using the collection initializer syntax. + + The first parameter type. + The second parameter type. + + + + Adds data to the theory data set. + + The first data value. + The second data value. + + + + Represents a set of data for a theory with 3 parameters. Data can + be added to the data set using the collection initializer syntax. + + The first parameter type. + The second parameter type. + The third parameter type. + + + + Adds data to the theory data set. + + The first data value. + The second data value. + The third data value. + + + + Represents a set of data for a theory with 4 parameters. Data can + be added to the data set using the collection initializer syntax. + + The first parameter type. + The second parameter type. + The third parameter type. + The fourth parameter type. + + + + Adds data to the theory data set. + + The first data value. + The second data value. + The third data value. + The fourth data value. + + + + Represents a set of data for a theory with 5 parameters. Data can + be added to the data set using the collection initializer syntax. + + The first parameter type. + The second parameter type. + The third parameter type. + The fourth parameter type. + The fifth parameter type. + + + + Adds data to the theory data set. + + The first data value. + The second data value. + The third data value. + The fourth data value. + The fifth data value. + + + + Represents a set of data for a theory with 5 parameters. Data can + be added to the data set using the collection initializer syntax. + + The first parameter type. + The second parameter type. + The third parameter type. + The fourth parameter type. + The fifth parameter type. + The sixth parameter type. + + + + Adds data to the theory data set. + + The first data value. + The second data value. + The third data value. + The fourth data value. + The fifth data value. + The sixth data value. + + + + Represents a set of data for a theory with 5 parameters. Data can + be added to the data set using the collection initializer syntax. + + The first parameter type. + The second parameter type. + The third parameter type. + The fourth parameter type. + The fifth parameter type. + The sixth parameter type. + The seventh parameter type. + + + + Adds data to the theory data set. + + The first data value. + The second data value. + The third data value. + The fourth data value. + The fifth data value. + The sixth data value. + The seventh data value. + + + + Represents a set of data for a theory with 5 parameters. Data can + be added to the data set using the collection initializer syntax. + + The first parameter type. + The second parameter type. + The third parameter type. + The fourth parameter type. + The fifth parameter type. + The sixth parameter type. + The seventh parameter type. + The eigth parameter type. + + + + Adds data to the theory data set. + + The first data value. + The second data value. + The third data value. + The fourth data value. + The fifth data value. + The sixth data value. + The seventh data value. + The eigth data value. + + + + Represents a set of data for a theory with 5 parameters. Data can + be added to the data set using the collection initializer syntax. + + The first parameter type. + The second parameter type. + The third parameter type. + The fourth parameter type. + The fifth parameter type. + The sixth parameter type. + The seventh parameter type. + The eigth parameter type. + The nineth parameter type. + + + + Adds data to the theory data set. + + The first data value. + The second data value. + The third data value. + The fourth data value. + The fifth data value. + The sixth data value. + The seventh data value. + The eigth data value. + The nineth data value. + + + + Represents a set of data for a theory with 5 parameters. Data can + be added to the data set using the collection initializer syntax. + + The first parameter type. + The second parameter type. + The third parameter type. + The fourth parameter type. + The fifth parameter type. + The sixth parameter type. + The seventh parameter type. + The eigth parameter type. + The nineth parameter type. + The tenth parameter type. + + + + Adds data to the theory data set. + + The first data value. + The second data value. + The third data value. + The fourth data value. + The fifth data value. + The sixth data value. + The seventh data value. + The eigth data value. + The nineth data value. + The tenth data value. + + + + Attribute used to decorate a test method with arbitrary name/value pairs ("traits"). + + + + + Creates a new instance of the class. + + The trait name + The trait value + + + + Rethrows an exception object without losing the existing stack trace information + + The exception to re-throw. + + For more information on this technique, see + http://www.dotnetjunkies.com/WebLog/chris.taylor/archive/2004/03/03/8353.aspx. + The remote_stack_trace string is here to support Mono. + + + + + Unwraps an exception to remove any wrappers, like . + + The exception to unwrap. + The unwrapped exception. + + + + Guard class, used for guard clauses and argument validation + + + + + + + + + + + + + diff --git a/packages/xunit.extensibility.core.2.4.2/lib/net452/xunit.runner.tdnet.dll b/packages/xunit.extensibility.core.2.4.2/lib/net452/xunit.runner.tdnet.dll new file mode 100755 index 000000000..e1d6509fc Binary files /dev/null and b/packages/xunit.extensibility.core.2.4.2/lib/net452/xunit.runner.tdnet.dll differ diff --git a/packages/xunit.extensibility.core.2.4.2/lib/net452/xunit.runner.utility.net452.dll b/packages/xunit.extensibility.core.2.4.2/lib/net452/xunit.runner.utility.net452.dll new file mode 100755 index 000000000..58e49e45c Binary files /dev/null and b/packages/xunit.extensibility.core.2.4.2/lib/net452/xunit.runner.utility.net452.dll differ diff --git a/packages/xunit.extensibility.core.2.4.2/lib/netstandard1.1/xunit.core.dll b/packages/xunit.extensibility.core.2.4.2/lib/netstandard1.1/xunit.core.dll new file mode 100755 index 000000000..fbc38a54e Binary files /dev/null and b/packages/xunit.extensibility.core.2.4.2/lib/netstandard1.1/xunit.core.dll differ diff --git a/packages/xunit.extensibility.core.2.4.2/lib/netstandard1.1/xunit.core.xml b/packages/xunit.extensibility.core.2.4.2/lib/netstandard1.1/xunit.core.xml new file mode 100755 index 000000000..34ffbbfc2 --- /dev/null +++ b/packages/xunit.extensibility.core.2.4.2/lib/netstandard1.1/xunit.core.xml @@ -0,0 +1,1255 @@ + + + + xunit.core + + + + + Attribute used to decorate an assembly with arbitrary name/value pairs ("traits"). + + + + + Creates a new instance of the class. + + The trait name + The trait value + + + + Provides a data source for a data theory, with the data coming from a class + which must implement IEnumerable<object[]>. + Caution: the property is completely enumerated by .ToList() before any test is run. Hence it should return independent object sets. + + + + + Initializes a new instance of the class. + + The class that provides the data. + + + + Gets the type of the class that provides the data. + + + + + + + + Used to declare a specific test collection for a test class. + + + + + Initializes a new instance of the class. + + The test collection name. + + + + Defines the built-in behavior types for collections in xUnit.net. + + + + + By default, generates a collection per assembly, and any test classes that are not + decorated with will be placed into the assembly-level + collection. + + + + + By default, generates a collection per test class for any test classes that are not + decorated with . + + + + + Used to declare the default test collection behavior for the assembly. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The collection behavior for the assembly. + + + + Initializes a new instance of the class. + + The type name of the test collection factory (that implements ). + The assembly that exists in. + + + + Determines whether tests in this assembly are run in parallel. + + + + + Determines how many tests can run in parallel with each other. If set to 0, the system will + use . If set to a negative number, then there will + be no limit to the number of threads. + + + + + Used to declare a test collection container class. The container class gives + developers a place to attach interfaces like and + that will be applied to all tests classes + that are members of the test collection. + + + + + Initializes a new instance of the class. + + The test collection name. + + + + Determines whether tests in this collection runs in parallel with any other collections. + + + + + + + + + + + + + + Attribute that is applied to a method to indicate that it is a fact that should be run + by the test runner. It can also be extended to support a customized definition of a + test method. + + + + + Gets the name of the test to be used when the test is skipped. Defaults to + null, which will cause the fully qualified test name to be used. + + + + + Marks the test so that it will not be run, and gets or sets the skip reason + + + + + Marks the test as having a timeout, and gets or sets the timeout (in milliseconds). + WARNING: Using this with parallelization turned on will result in undefined behavior. + Timeout is only supported when parallelization is disabled, either globally or with + a parallelization-disabled test collection. + + + + + Used to provide asynchronous lifetime functionality. Currently supported: + - Test classes + - Classes used in + - Classes used in . + + + + + Called immediately after the class has been created, before it is used. + + + + + Called when an object is no longer needed. Called just before + if the class also implements that. + + + + + Used to decorate xUnit.net test classes and collections to indicate a test which has + per-test-class fixture data. An instance of the fixture data is initialized just before + the first test in the class is run, and if it implements IDisposable, is disposed + after the last test in the class is run. To gain access to the fixture data from + inside the test, a constructor argument should be added to the test class which + exactly matches the . Class fixtures must have a + single parameterless constructor, and may take collection fixture types as constructor + arguments. + + The type of the fixture. + + If asynchronous setup of is required + it should implement the interface. + + + + + Used to decorate xUnit.net test classes and collections to indicate a test which has + per-test-collection fixture data. An instance of the fixture data is initialized just before + the first test in the collection is run, and if it implements IDisposable, is disposed + after the last test in the collection is run. To gain access to the fixture data from + inside the test, a constructor argument should be added to the test class which + exactly matches the . + + The type of the fixture. + + If asynchronous setup of is required + it should implement the interface. + + + + + Provides a data source for a data theory, with the data coming from inline values. + + + + + Initializes a new instance of the class. + + The data values to pass to the theory. + + + + + + + A class implements this interface to participate in ordering tests + for the test runner. Test collection orderers are applied using the + , which can be applied at + the assembly level. + + + + + Orders test collections for execution. + + The test collections to be ordered. + The test collections in the order to be run. + + + + Provides a data source for a data theory, with the data coming from one of the following sources: + 1. A static property + 2. A static field + 3. A static method (with parameters) + The member must return something compatible with IEnumerable<object[]> with the test data. + Caution: the property is completely enumerated by .ToList() before any test is run. Hence it should return independent object sets. + + + + + Initializes a new instance of the class. + + The name of the public static member on the test class that will provide the test data + The parameters for the member (only supported for methods; ignored for everything else) + + + + + + + Provides a base class for attributes that will provide member data. The member data must return + something compatible with . + Caution: the property is completely enumerated by .ToList() before any test is run. Hence it should return independent object sets. + + + + + Initializes a new instance of the class. + + The name of the public static member on the test class that will provide the test data + The parameters for the member (only supported for methods; ignored for everything else) + + + + Returns true if the data attribute wants to skip enumerating data during discovery. + This will cause the theory to yield a single test case for all data, and the data discovery + will be during test execution instead of discovery. + + + + + Gets the member name. + + + + + Gets or sets the type to retrieve the member from. If not set, then the property will be + retrieved from the unit test class. + + + + + Gets or sets the parameters passed to the member. Only supported for static methods. + + + + + + + + Converts an item yielded by the data member to an object array, for return from . + + The method that is being tested. + An item yielded from the data member. + An suitable for return from . + + + + Allows the user to record actions for a test. + + + + + Records any exception which is thrown by the given code. + + The code which may throw an exception. + Returns the exception that was thrown by the code; null, otherwise. + + + + Records any exception which is thrown by the given code that has + a return value. Generally used for testing property accessors. + + The code which may throw an exception. + Returns the exception that was thrown by the code; null, otherwise. + + + + + + + Records any exception which is thrown by the given task. + + The task which may throw an exception. + Returns the exception that was thrown by the code; null, otherwise. + + + + + + + The implementation of which returns the trait values + for . + + + + + + + + Base attribute which indicates a test method interception (allows code to be run before and + after the test is run). + + + + + This method is called after the test method is executed. + + The method under test + + + + This method is called before the test method is executed. + + The method under test + + + + Abstract attribute which represents a data source for a data theory. + Data source providers derive from this attribute and implement GetData + to return the data for the theory. + Caution: the property is completely enumerated by .ToList() before any test is run. Hence it should return independent object sets. + + + + + Returns the data to be used to test the theory. + + The method that is being tested + One or more sets of theory data. Each invocation of the test method + is represented by a single object array. + + + + Marks all test cases generated by this data source as skipped. + + + + + Default implementation of . Uses reflection to find the + data associated with ; may return null when called + without reflection-based abstraction implementations. + + + + + + + + + + + An attribute used to decorate classes which derive from , + to indicate how data elements should be discovered. + + + + + Initializes an instance of . + + The fully qualified type name of the discoverer + (f.e., 'Xunit.Sdk.DataDiscoverer') + The name of the assembly that the discoverer type + is located in, without file extension (f.e., 'xunit.execution') + + + + Aggregates exceptions. Intended to run one or more code blocks, and collect the + exceptions thrown by those code blocks. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class that + contains the exception list of its parent. + + The parent aggregator to copy exceptions from. + + + + Returns true if the aggregator has at least one exception inside it. + + + + + Adds an exception to the aggregator. + + The exception to be added. + + + + Adds exceptions from another aggregator into this aggregator. + + The aggregator whose exceptions should be copied. + + + + Clears the aggregator. + + + + + Runs the code, catching the exception that is thrown and adding it to + the aggregate. + + The code to be run. + + + + Runs the code, catching the exception that is thrown and adding it to + the aggregate. + + The code to be run. + + + + Runs the code, catching the exception that is thrown and adding it to + the aggregate. + + The code to be run. + + + + Returns an exception that represents the exceptions thrown by the code + passed to the or method. + + Returns null if no exceptions were thrown; returns the + exact exception if a single exception was thrown; returns + if more than one exception was thrown. + + + + This class is responsible for discovering the data available in an implementation + of . The discovery process may not always have access + to reflection (i.e., running in Resharper), so the discoverer must make a best + effort to return data, but may return null when there is not enough information + available (for example, if reflection is required to answer the question). + + + + + Returns the data to be used to test the theory. + + + This will be called during + discovery, at which point the may or may not + be backed by reflection (i.e., implementing ). + If the data is not available because reflection is required, then you may return + null to inform xUnit that the quantity of data is unknown at this point. + When the tests are run, if you returned back null during discovery, then this method + will be called again to retrieve the data, this time guaranteed to provide + an implementation of . At this time, you + must return the actual data, and returning null is not legal. + + The data attribute being discovered + The method that is being tested/discovered + The theory data (or null during discovery, if not enough + information is available to enumerate the data) + + + + Returns true if the data attribute supports enumeration during + discovery; false otherwise. Data attributes with expensive computational + costs and/or randomized data sets should return false. + + + + + Used by discovery, execution, and extensibility code to send messages to the runner. + + + + + Queues a message to be sent to the runner. + + The message to be sent to the runner + + Returns true if discovery/execution should continue; false, otherwise. + The return value may be safely ignored by components which are not directly responsible + for discovery or execution, and this is intended to communicate to those sub-systems that + that they should short circuit and stop their work as quickly as is reasonable. + + + + + Implementation of used to discover the data + provided by . + + + + + + + + + + + A class implements this interface to participate in ordering tests + for the test runner. Test case orderers are applied using the + , which can be applied at + the assembly, test collection, and test class level. + + + + + Orders test cases for execution. + + The test cases to be ordered. + The test cases in the order to be run. + + + + Marker interface that must be implemented by test framework attributes, so + that the test framework attribute discoverer can find them. + + + + + Interface to be implemented by classes which are used to discover the test framework. + + + + + Gets the type that implements to be used to discover + and run tests. + + The test framework attribute that decorated the assembly + The test framework type + + + + Marker interface used by attributes which provide trait data. + + + + + This interface is implemented by discoverers that provide trait values to + xUnit.net v2 tests. + + + + + Gets the trait values from the trait attribute. + + The trait attribute containing the trait values. + The trait values. + + + + Represents a single test case from xUnit.net v2. + + + + + Gets the exception that happened during initialization. When this is set, then + the test execution should fail with this exception. + + + + + Gets the method to be run. Differs from . in that + any generic argument types will have been closed based on the arguments. + + + + + Gets the timeout of the test, in milliseconds; if zero or negative, means the test case has no timeout. + + + + + Executes the test case, returning 0 or more result messages through the message sink. + + The message sink used to send diagnostic messages to. + The message bus to report results to. + The arguments to pass to the constructor. + The error aggregator to use for catching exception. + The cancellation token source that indicates whether cancellation has been requested. + Returns the summary of the test case run. + + + + Interface to be implemented by classes which are used to discover tests cases attached + to test methods that are attributed with (or a subclass). + + + + + Discover test cases from a test method. + + The discovery options to be used. + The test method the test cases belong to. + The fact attribute attached to the test method. + Returns zero or more test cases represented by the test method. + + + + This interface is intended to be implemented by components which generate test collections. + End users specify the desired test collection factory by applying + at the assembly level. Classes which implement this interface must have a constructor + that takes and . + + + + + Gets the display name for the test collection factory. This information is shown to the end + user as part of the description of the test environment. + + + + + Gets the test collection for a given test class. + + The test class. + The test collection. + + + + Implementation of for discovering . + + + + + + + + Marks an assembly as a platform specific assembly for use with xUnit.net. Type references from + such assemblies are allowed to use a special suffix ("My.Assembly.{Platform}"), which will + automatically be translated into the correct platform-specific name ("My.Assembly.desktop", + "My.Assembly.win8", etc.). This affects both extensibility points which require specifying + a string-based type name and assembly, as well as serialization. + + In v2.1 and later, the supported platform target names include: + + "desktop" (for desktop and PCL tests), + "dotnet" (everything else). + + In v2.0, the following names were also supported: + + "iOS-Universal" (for Xamarin test projects targeting iOS), + "MonoAndroid" (for Xamarin MonoAndroid tests), + "MonoTouch" (for Xamarin MonoTouch tests), + "universal" (for Windows Phone 8.1 and Windows 8.1 tests), + "win8" (for Windows 8 tests), + "wp8" (for Windows Phone 8 Silverlight tests). + + For backward compatibility reasons, the v2.1 runners will support tests linked against + the v2.0 execution libraries. + + Note that file names may be case sensitive (when running on platforms with case sensitive + file systems like Linux), so ensure that your assembly file name casing is consistent, and + that you use the suffixes here with the exact case shown. + + + + + Represents the statistical summary from a run of one or more tests. + + + + + The total number of tests run. + + + + + The number of failed tests. + + + + + The number of skipped tests. + + + + + The total time taken to run the tests, in seconds. + + + + + Adds a run summary's totals into this run summary. + + The run summary to be added. + + + + Decorates an implementation of that is used to + determine which test framework is used to discover and run tests. + + + + + Initializes an instance of . + + The fully qualified type name of the discoverer + (f.e., 'Xunit.Sdk.DataDiscoverer') + The name of the assembly that the discoverer type + is located in, without file extension (f.e., 'xunit.execution') + + + + The implementation of which returns the trait values + for . + + + + + + + + An attribute used to decorate classes which implement , + to indicate how trait values should be discovered. The discoverer type must implement + . + + + + + Initializes an instance of . + + The fully qualified type name of the discoverer + (f.e., 'Xunit.Sdk.TraitDiscoverer') + The name of the assembly that the discoverer type + is located in, without file extension (f.e., 'xunit.execution') + + + + An attribute used to decorate classes which derive from , + to indicate how test cases should be discovered. + + + + + Initializes an instance of the class. + + The fully qualified type name of the discoverer + (f.e., 'Xunit.Sdk.FactDiscoverer') + The name of the assembly that the discoverer type + is located in, without file extension (f.e., 'xunit.execution') + + + + Indicates the default display name format for test methods. + + + + + Use a fully qualified name (namespace + class + method) + + + + + Use just the method name (without class) + + + + + Indicates the method display options for test methods. + + + + + Indicates no additional method display options. + + This is the default configuration option. + + + + Replace underscores in display names with a space. + + + + + Replace well-known monikers with their equivalent operator. + + + lt : < + le : <= + eq : = + ne : != + gt : > + ge : >= + + + + + Replace supported escape sequences with their equivalent character. + + + Encoding + Format + + ASCIIX hex-digit hex-digit (ex: X2C) + UnicodeU hex-digit hex-digit hex-digit hex-digit (ex: U00A9) + + + + + + Replaces the period delimiter used in namespace and type references with a comma. + + This option is only honored if the setting is also enabled. + + + + Enables all method display options. + + + + + Formats arguments for display in theories. + + + + + Format the value for presentation. + + The value to be formatted. + + + The formatted value. + + + + Format the value for presentation. + + The value to be formatted. + + The formatted value. + + + + Default implementation of used by the xUnit.net equality assertions. + + The type that is being compared. + + + + Initializes a new instance of the class. + + The inner comparer to be used when the compared objects are enumerable. + + + + + + + + + + + + + A class that wraps to create . + + The type that is being compared. + + + + Initializes a new instance of the class. + + The comparer that is being adapted. + + + + + + + + + + Used to decorate an assembly, test collection, or test class to allow + the use of a custom . + + + + + Initializes a new instance of the class. + + The type name of the orderer class (that implements ). + The assembly that exists in. + + + + Used to decorate an assembly to allow the use of a custom . + + + + + Initializes a new instance of the class. + + The type name of the orderer class (that implements ). + The assembly that exists in. + + + + Used to decorate an assembly to allow the use of a custom . + + + + + Initializes an instance of . + + The fully qualified type name of the test framework + (f.e., 'Xunit.Sdk.XunitTestFramework') + The name of the assembly that the test framework type + is located in, without file extension (f.e., 'xunit.execution') + + + + Marks a test method as being a data theory. Data theories are tests which are fed + various bits of data from a data source, mapping to parameters on the test method. + If the data source contains multiple rows, then the test method is executed + multiple times (once with each data row). Data is provided by attributes which + derive from (notably, and + ). + + + + + Provides data for theories based on collection initialization syntax. + + + + + Adds a row to the theory. + + The values to be added. + + + + + + + + + + Represents a set of data for a theory with a single parameter. Data can + be added to the data set using the collection initializer syntax. + + The parameter type. + + + + Adds data to the theory data set. + + The data value. + + + + Represents a set of data for a theory with 2 parameters. Data can + be added to the data set using the collection initializer syntax. + + The first parameter type. + The second parameter type. + + + + Adds data to the theory data set. + + The first data value. + The second data value. + + + + Represents a set of data for a theory with 3 parameters. Data can + be added to the data set using the collection initializer syntax. + + The first parameter type. + The second parameter type. + The third parameter type. + + + + Adds data to the theory data set. + + The first data value. + The second data value. + The third data value. + + + + Represents a set of data for a theory with 4 parameters. Data can + be added to the data set using the collection initializer syntax. + + The first parameter type. + The second parameter type. + The third parameter type. + The fourth parameter type. + + + + Adds data to the theory data set. + + The first data value. + The second data value. + The third data value. + The fourth data value. + + + + Represents a set of data for a theory with 5 parameters. Data can + be added to the data set using the collection initializer syntax. + + The first parameter type. + The second parameter type. + The third parameter type. + The fourth parameter type. + The fifth parameter type. + + + + Adds data to the theory data set. + + The first data value. + The second data value. + The third data value. + The fourth data value. + The fifth data value. + + + + Represents a set of data for a theory with 5 parameters. Data can + be added to the data set using the collection initializer syntax. + + The first parameter type. + The second parameter type. + The third parameter type. + The fourth parameter type. + The fifth parameter type. + The sixth parameter type. + + + + Adds data to the theory data set. + + The first data value. + The second data value. + The third data value. + The fourth data value. + The fifth data value. + The sixth data value. + + + + Represents a set of data for a theory with 5 parameters. Data can + be added to the data set using the collection initializer syntax. + + The first parameter type. + The second parameter type. + The third parameter type. + The fourth parameter type. + The fifth parameter type. + The sixth parameter type. + The seventh parameter type. + + + + Adds data to the theory data set. + + The first data value. + The second data value. + The third data value. + The fourth data value. + The fifth data value. + The sixth data value. + The seventh data value. + + + + Represents a set of data for a theory with 5 parameters. Data can + be added to the data set using the collection initializer syntax. + + The first parameter type. + The second parameter type. + The third parameter type. + The fourth parameter type. + The fifth parameter type. + The sixth parameter type. + The seventh parameter type. + The eigth parameter type. + + + + Adds data to the theory data set. + + The first data value. + The second data value. + The third data value. + The fourth data value. + The fifth data value. + The sixth data value. + The seventh data value. + The eigth data value. + + + + Represents a set of data for a theory with 5 parameters. Data can + be added to the data set using the collection initializer syntax. + + The first parameter type. + The second parameter type. + The third parameter type. + The fourth parameter type. + The fifth parameter type. + The sixth parameter type. + The seventh parameter type. + The eigth parameter type. + The nineth parameter type. + + + + Adds data to the theory data set. + + The first data value. + The second data value. + The third data value. + The fourth data value. + The fifth data value. + The sixth data value. + The seventh data value. + The eigth data value. + The nineth data value. + + + + Represents a set of data for a theory with 5 parameters. Data can + be added to the data set using the collection initializer syntax. + + The first parameter type. + The second parameter type. + The third parameter type. + The fourth parameter type. + The fifth parameter type. + The sixth parameter type. + The seventh parameter type. + The eigth parameter type. + The nineth parameter type. + The tenth parameter type. + + + + Adds data to the theory data set. + + The first data value. + The second data value. + The third data value. + The fourth data value. + The fifth data value. + The sixth data value. + The seventh data value. + The eigth data value. + The nineth data value. + The tenth data value. + + + + Attribute used to decorate a test method with arbitrary name/value pairs ("traits"). + + + + + Creates a new instance of the class. + + The trait name + The trait value + + + + Rethrows an exception object without losing the existing stack trace information + + The exception to re-throw. + + For more information on this technique, see + http://www.dotnetjunkies.com/WebLog/chris.taylor/archive/2004/03/03/8353.aspx. + The remote_stack_trace string is here to support Mono. + + + + + Unwraps an exception to remove any wrappers, like . + + The exception to unwrap. + The unwrapped exception. + + + + Guard class, used for guard clauses and argument validation + + + + + + + + + + + + + diff --git a/packages/xunit.extensibility.core.2.4.2/xunit.extensibility.core.2.4.2.nupkg b/packages/xunit.extensibility.core.2.4.2/xunit.extensibility.core.2.4.2.nupkg new file mode 100755 index 000000000..6eab52dbf Binary files /dev/null and b/packages/xunit.extensibility.core.2.4.2/xunit.extensibility.core.2.4.2.nupkg differ diff --git a/packages/xunit.extensibility.execution.2.4.2/.signature.p7s b/packages/xunit.extensibility.execution.2.4.2/.signature.p7s new file mode 100755 index 000000000..3c835702f Binary files /dev/null and b/packages/xunit.extensibility.execution.2.4.2/.signature.p7s differ diff --git a/packages/xunit.extensibility.execution.2.4.2/_content/logo-128-transparent.png b/packages/xunit.extensibility.execution.2.4.2/_content/logo-128-transparent.png new file mode 100755 index 000000000..9a8896bc0 Binary files /dev/null and b/packages/xunit.extensibility.execution.2.4.2/_content/logo-128-transparent.png differ diff --git a/packages/xunit.extensibility.execution.2.4.2/lib/net452/xunit.execution.desktop.dll b/packages/xunit.extensibility.execution.2.4.2/lib/net452/xunit.execution.desktop.dll new file mode 100755 index 000000000..33c1e3fe7 Binary files /dev/null and b/packages/xunit.extensibility.execution.2.4.2/lib/net452/xunit.execution.desktop.dll differ diff --git a/packages/xunit.extensibility.execution.2.4.2/lib/net452/xunit.execution.desktop.xml b/packages/xunit.extensibility.execution.2.4.2/lib/net452/xunit.execution.desktop.xml new file mode 100755 index 000000000..0e7ee098c --- /dev/null +++ b/packages/xunit.extensibility.execution.2.4.2/lib/net452/xunit.execution.desktop.xml @@ -0,0 +1,4225 @@ + + + + xunit.execution.desktop + + + + + This class represents utility methods needed to supplement the + reflection capabilities provided by the CLR + + + + + Creates an instance of the test class for the given test case. Sends the + and messages as appropriate. + + The test + The type of the test class + The constructor arguments for the test class + The message bus used to send the test messages + The timer used to measure the time taken for construction + The cancellation token source + + + + + Disposes the test class instance. Sends the and + messages as appropriate. + + The test + The test class instance to be disposed + The message bus used to send the test messages + The timer used to measure the time taken for construction + The cancellation token source + + + + Gets methods in the target type that match the protection level of the supplied method + + The type + The method + The reflection method informations that match + + + + Gets all the custom attributes for the given assembly. + + The assembly + The type of the attribute + The matching attributes that decorate the assembly + + + + Gets all the custom attributes for the given attribute. + + The attribute + The type of the attribute to find + The matching attributes that decorate the attribute + + + + Gets all the custom attributes for the method that are of the given type. + + The method + The type of the attribute + The matching attributes that decorate the method + + + + Gets all the custom attributes for the given type. + + The type + The type of the attribute + The matching attributes that decorate the type + + + + Converts an into a , if possible (for example, this + will not work when the test method is based on source code rather than binaries). + + The method to convert + The runtime method, if available; null, otherwise + + + + Converts an into a , if possible (for example, this + will not work when the test class is based on source code rather than binaries). + + The type to convert + The runtime type, if available, null, otherwise + + + + Extension methods for reading and . + + + + + Gets a flag that determines whether diagnostic messages will be emitted. + + + + + Gets a flag that determines whether diagnostic messages will be emitted. If the flag is not present, + returns the default value (false). + + + + + Gets a flag that determines the default display name format for test methods. + + + + + Gets a flag that determines the default display options to format test methods. + + + + + Gets a flag that determines the default display name format for test methods. If the flag is not present, + returns the default value (). + + + + + Gets the options that determine the default display formatting options for test methods. If no options are not present, + returns the default value (). + + + + + Gets a flag that determines whether theories are pre-enumerated. If they enabled, then the + discovery system will return a test case for each row of test data; they are disabled, then the + discovery system will return a single test case for the theory. + + + + + Gets a flag that determines whether theories are pre-enumerated. If enabled, then the + discovery system will return a test case for each row of test data; if disabled, then the + discovery system will return a single test case for the theory. If the flag is not present, + returns the default value (true). + + + + + Gets a flag that determines whether xUnit.net should report test results synchronously. + + + + + Gets a flag that determines whether xUnit.net should report test results synchronously. + If the flag is not set, returns the default value (false). + + + + + Gets a flag that determines whether diagnostic messages will be emitted. + + + + + Gets a flag that determines whether diagnostic messages will be emitted. If the flag is not + present, returns the default value (false). + + + + + Gets a flag to disable parallelization. + + + + + Gets a flag to disable parallelization. If the flag is not present, returns the + default value (false). + + + + + Gets the maximum number of threads to use when running tests in parallel. + + + + + Gets the maximum number of threads to use when running tests in parallel. If set to 0 (or not set), + the value of is used; if set to a value less + than 0, does not limit the number of threads. + + + + + Gets a flag to stop testing on test failure. + + + + + Gets a flag to stop testing on test failure. If the flag is not present, returns the + default value (false). + + + + + Gets a flag that determines whether xUnit.net should report test results synchronously. + + + + + Gets a flag that determines whether xUnit.net should report test results synchronously. + If the flag is not set, returns the default value (false). + + + + + This implementation of allows the developer to track the count + of outstanding "async void" operations, and wait for them all to complete. + + + + + Initializes a new instance of the class. + + The existing synchronization context (may be null). + + + + + + + + + + + + + + + + Returns a task which is signaled when all outstanding operations are complete. + + + + + Default implementation of . Orders tests in + an unpredictable but stable order, so that repeated test runs of the + identical test assembly run tests in the same order. + + + + + Initializes a new instance of the class. + + Message sink to report diagnostic messages to + + + + + + + Default implementation of . Orders tests in + an unpredictable and unstable order, so that repeated test runs of the + identical test assembly run test collections in a random order. + + + + + + + + Tracks disposable objects, and disposes them in the reverse order they were added to + the tracker. + + + + + Add an object to be disposed. + + The object to be disposed. + + + + + + + Represents a caching factory for the types used for extensibility throughout the system. + + + + + Disposes the instances that are contained in the cache. + + + + + Gets an instance of the given type, casting it to , using the provided + constructor arguments. There is a single instance of a given type that is cached and reused, + so classes retrieved from this factory must be stateless and thread-safe. + + The interface type. + The message sink used to send diagnostic messages + The implementation type. + The constructor arguments. Since diagnostic message sinks are optional, + the code first looks for a type that takes the given arguments plus the message sink, and only + falls back to the message sink-less constructor if none was found. + The instance of the type. + + + + Gets a data discoverer. + + The message sink used to send diagnostic messages + The discoverer type + + + + Gets a data discoverer, as specified in a reflected . + + The message sink used to send diagnostic messages + The data discoverer attribute + The data discoverer, if the type is loadable; null, otherwise. + + + + Gets a test case orderer. + + The message sink used to send diagnostic messages + The test case orderer type + + + + Gets a test case orderer, as specified in a reflected . + + The message sink used to send diagnostic messages + The test case orderer attribute. + The test case orderer, if the type is loadable; null, otherwise. + + + + Gets a test collection orderer. + + The message sink used to send diagnostic messages + The test collection orderer type + + + + Gets a test collection orderer, as specified in a reflected . + + The message sink used to send diagnostic messages + The test collection orderer attribute. + The test collection orderer, if the type is loadable; null, otherwise. + + + + Gets a test framework discoverer. + + The message sink used to send diagnostic messages + The test framework type discoverer type + + + + Gets a test framework discoverer, as specified in a reflected . + + The message sink used to send diagnostic messages + The test framework discoverer attribute + + + + Gets a trait discoverer. + + The message sink used to send diagnostic messages + The trait discoverer type + + + + Gets a trait discoverer, as specified in a reflected . + + The message sink used to send diagnostic messages + The trait discoverer attribute. + The trait discoverer, if the type is loadable; null, otherwise. + + + + Gets an xUnit.net v2 test discoverer. + + The message sink used to send diagnostic messages + The test case discoverer type + + + + Gets an xUnit.net v2 test collection factory. + + The message sink used to send diagnostic messages + The test collection factory type + The test assembly under test + + + + Gets an xUnit.net v2 test collection factory, as specified in a reflected . + + The message sink used to send diagnostic messages + The collection behavior attribute. + The test assembly. + The collection factory. + + + + Implementation of that creates a single + default test collection for the assembly, and places any tests classes without + the into it. + + + + + Initializes a new instance of the class. + + The assembly. + The message sink used to send diagnostic messages + + + + + + + + + + Implementation of which creates a new test + collection for each test class that isn't decorated with . + + + + + Initializes a new instance of the class. + + The assembly info. + The message sink used to send diagnostic messages + + + + + + + + + + Represents a formatter that formats the display name of a class and/or method into a more + human readable form using additional options. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The used by the formatter. + The used by the formatter. + + + + Formats the specified display name. + + The display name to format. + The formatted display name. + + + + A simple implementation of that can be used to report an error + rather than running a test. + + + + + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + Default method display to use (when not customized). + The test method. + The error message to report for the test. + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + Default method display to use (when not customized). + Default method display options to use (when not customized). + The test method. + The error message to report for the test. + + + + Gets the error message that will be display when the test is run. + + + + + + + + + + + + + + Measures and aggregates execution time of one or more actions. + + + + + Returns the total time aggregated across all the actions. + + + + + Executes an action and aggregates its run time into the total. + + The action to measure. + + + + Executes an asynchronous action and aggregates its run time into the total. + + The action to measure. + + + + Aggregates a time span into the total time. + + The time to add. + + + + Implementation of that supports finding test cases + on methods decorated with . + + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + + + + Gets the message sink used to report messages. + + + + + Creates a single for the given test method. + + The discovery options to be used. + The test method. + The attribute that decorates the test method. + + + + + Discover test cases from a test method. By default, if the method is generic, or + it contains arguments, returns a single ; + otherwise, it returns the result of calling . + + The discovery options to be used. + The test method the test cases belong to. + The fact attribute attached to the test method. + Returns zero or more test cases represented by the test method. + + + + An implementation of to support . + + + + + Initializes a new instance of the class. + + The test case that the lambda represents. + The message bus to report run status to. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + + + + A base class that provides default behavior when running tests in an assembly. It groups the tests + by test collection, and then runs the individual test collections. + + The type of the test case used by the test framework. Must + derive from . + + + + Initializes a new instance of the class. + + The assembly that contains the tests to be run. + The test cases to be run. + The message sink to report diagnostic messages to. + The message sink to report run status to. + The user's requested execution options. + + + + Gets or sets the exception aggregator used to run code and collect exceptions. + + + + + Gets or sets the user's requested execution options. + + + + + Gets or sets the message sink to report diagnostic messages to. + + + + + Gets or sets the message sink to report run status to. + + + + + Gets or sets the assembly that contains the tests to be run. + + + + + Gets or sets the test case orderer that will be used to decide how to order the tests. + + + + + Gets or sets the test collection orderer that will be used to decide how to order the test collections. + + + + + Gets or sets the test cases to be run. + + + + + + + + Override this to provide the display name for the test framework (f.e., "xUnit.net 2.0"). + This value is placed into . + + + + + Override this to provide the environment information (f.e., "32-bit .NET 4.0"). This value is + placed into . + + + + + This method is called just after is sent, but before any test collections are run. + This method should NEVER throw; any exceptions should be placed into the . + + + + + This method is called just before is sent. + This method should NEVER throw; any exceptions should be placed into the . + + + + + Creates the message bus to be used for test execution. By default, it inspects + the options for the + flag, and if present, creates a message bus that ensures all messages are delivered + on the same thread. + + The message bus. + + + + Orders the test collections using the . + + Test collections (and the associated test cases) in run order + + + + Runs the tests in the test assembly. + + Returns summary information about the tests that were run. + + + + Runs the list of test collections. By default, groups the tests by collection and runs them synchronously. + + The message bus to report run status to. + The task cancellation token source, used to cancel the test run. + Returns summary information about the tests that were run. + + + + Override this method to run the tests in an individual test collection. + + The message bus to report run status to. + The test collection that is being run. + The test cases to be run. + The task cancellation token source, used to cancel the test run. + Returns summary information about the tests that were run. + + + + A base class that provides default behavior when running test cases. + + The type of the test case used by the test framework. Must + derive from . + + + + Initializes a new instance of the class. + + The test case to be run. + The message bus to report run status to. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets or sets the exception aggregator used to run code and collect exceptions. + + + + + Gets or sets the task cancellation token source, used to cancel the test run. + + + + + Gets or sets the message bus to report run status to. + + + + + Gets or sets the test case to be run. + + + + + This method is called just after is sent, but before any test collections are run. + This method should NEVER throw; any exceptions should be placed into the . + + + + + This method is called just before is sent. + This method should NEVER throw; any exceptions should be placed into the . + + + + + Runs the tests in the test case. + + Returns summary information about the tests that were run. + + + + Override this method to run the tests in an individual test method. + + Returns summary information about the tests that were run. + + + + A base class that provides default behavior when running tests in a test class. It groups the tests + by test method, and then runs the individual test methods. + + The type of the test case used by the test framework. Must + derive from . + + + + Initializes a new instance of the class. + + The test class to be run. + The test class that contains the tests to be run. + The test cases to be run. + The message sink used to send diagnostic messages + The message bus to report run status to. + The test case orderer that will be used to decide how to order the test. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets or sets the exception aggregator used to run code and collect exceptions. + + + + + Gets or sets the task cancellation token source, used to cancel the test run. + + + + + Gets or sets the CLR class that contains the tests to be run. + + + + + Gets the message sink used to send diagnostic messages. + + + + + Gets or sets the message bus to report run status to. + + + + + Gets or sets the test case orderer that will be used to decide how to order the test. + + + + + Gets or sets the test cases to be run. + + + + + Gets or sets the test class to be run. + + + + + Creates the arguments for the test class constructor. Attempts to resolve each parameter + individually, and adds an error when the constructor arguments cannot all be provided. + If the class is static, does not look for constructor, since one will not be needed. + + The test class constructor arguments. + + + + Gets the message to be used when the constructor is missing arguments. + + + + + This method is called just after is sent, but before any test methods are run. + This method should NEVER throw; any exceptions should be placed into the . + + + + + This method is called just before is sent. + This method should NEVER throw; any exceptions should be placed into the . + + + + + Runs the tests in the test class. + + Returns summary information about the tests that were run. + + + + Runs the list of test methods. By default, orders the tests, groups them by method and runs them synchronously. + + Returns summary information about the tests that were run. + + + + Override this method to run the tests in an individual test method. + + The test method that contains the test cases. + The CLR method that contains the tests to be run. + The test cases to be run. + The constructor arguments that will be used to create the test class. + Returns summary information about the tests that were run. + + + + Selects the constructor to be used for the test class. By default, chooses the parameterless + constructor. Override to change the constructor selection logic. + + The constructor to be used for creating the test class. + + + + Tries to supply a test class constructor argument. By default, always fails. Override to + change the argument lookup logic. + + The constructor that will be used to create the test class. + The parameter index. + The parameter information. + The argument value that should be used for the parameter. + Returns true if the argument was supplied; false, otherwise. + + + + A base class that provides default behavior when running tests in a test collection. It groups the tests + by test class, and then runs the individual test classes. + + The type of the test case used by the test framework. Must + derive from . + + + + Initializes a new instance of the class. + + The test collection that contains the tests to be run. + The test cases to be run. + The message bus to report run status to. + The test case orderer that will be used to decide how to order the test. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets or sets the exception aggregator used to run code and collect exceptions. + + + + + Gets or sets the task cancellation token source, used to cancel the test run. + + + + + Gets or sets the message bus to report run status to. + + + + + Gets or sets the test case orderer that will be used to decide how to order the test. + + + + + Gets or sets the test cases to be run. + + + + + Gets or sets the test collection that contains the tests to be run. + + + + + This method is called just after is sent, but before any test classes are run. + This method should NEVER throw; any exceptions should be placed into the . + + + + + This method is called just before is sent. + This method should NEVER throw; any exceptions should be placed into the . + + + + + Runs the tests in the test collection. + + Returns summary information about the tests that were run. + + + + Runs the list of test classes. By default, groups the tests by class and runs them synchronously. + + Returns summary information about the tests that were run. + + + + Override this method to run the tests in an individual test class. + + The test class to be run. + The CLR class that contains the tests to be run. + The test cases to be run. + Returns summary information about the tests that were run. + + + + A base class that provides default behavior to invoke a test method. This includes + support for async test methods (both "async Task" and "async void") as well as + creation and disposal of the test class. + + The type of the test case used by the test framework. Must + derive from . + + + + Initializes a new instance of the class. + + The test that this invocation belongs to. + The message bus to report run status to. + The test class that the test method belongs to. + The arguments to be passed to the test class constructor. + The test method that will be invoked. + The arguments to be passed to the test method. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets or sets the exception aggregator used to run code and collect exceptions. + + + + + Gets or sets the task cancellation token source, used to cancel the test run. + + + + + Gets or sets the constructor arguments used to construct the test class. + + + + + Gets the display name of the invoked test. + + + + + Gets or sets the message bus to report run status to. + + + + + Gets or sets the test to be run. + + + + + Gets the test case to be run. + + + + + Gets or sets the runtime type of the class that contains the test method. + + + + + Gets or sets the runtime method of the method that contains the test. + + + + + Gets or sets the arguments to pass to the test method when it's being invoked. + + + + + Gets or sets the object which measures execution time. + + + + + Creates the test class, unless the test method is static or there have already been errors. Note that + this method times the creation of the test class (using ). It is also responsible for + sending the and + messages, so if you override this method without calling the base, you are responsible for all of this behavior. + This method should NEVER throw; any exceptions should be placed into the . + + The class instance, if appropriate; null, otherwise + + + + This method is called just after the test method has finished executing. + This method should NEVER throw; any exceptions should be placed into the . + + + + + This method is called just before the test method is invoked. + This method should NEVER throw; any exceptions should be placed into the . + + + + + This method calls the test method via reflection. This is an available override point + if you need to do some other form of invocation of the actual test method. + + The instance of the test class + The return value from the test method invocation + + + + Given an object, will determine if it is an instance of (in which case, it is + directly returned), or an instance of + (in which case it is converted), or neither (in which case null is returned). + + The object to convert + + + + Creates the test class (if necessary), and invokes the test method. + + Returns the time (in seconds) spent creating the test class, running + the test, and disposing of the test class. + + + + Invokes the test method on the given test class instance. This method sets up support for "async void" + test methods, ensures that the test method has the correct number of arguments, then calls + to do the actual method invocation. It ensure that any async test method is fully completed before returning, and + returns the measured clock time that the invocation took. + + The test class instance + Returns the time taken to invoke the test method + + + + A base class that provides default behavior when running tests in a test method. + + The type of the test case used by the test framework. Must + derive from . + + + + Initializes a new instance of the class. + + The test method under test. + The CLR class that contains the test method. + The CLR method that contains the tests to be run. + The test cases to be run. + The message bus to report run status to. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets or sets the exception aggregator used to run code and collect exceptions. + + + + + Gets or sets the task cancellation token source, used to cancel the test run. + + + + + Gets or sets the CLR class that contains the test method. + + + + + Gets or sets the message bus to report run status to. + + + + + Gets or sets the CLR method that contains the tests to be run. + + + + + Gets or sets the test cases to be run. + + + + + Gets or sets the test method that contains the test cases. + + + + + This method is called just after is sent, but before any test cases are run. + This method should NEVER throw; any exceptions should be placed into the . + + + + + This method is called just before is sent. + This method should NEVER throw; any exceptions should be placed into the . + + + + + Runs the tests in the test method. + + Returns summary information about the tests that were run. + + + + Runs the list of test cases. By default, it runs the cases in order, synchronously. + + Returns summary information about the tests that were run. + + + + Override this method to run an individual test case. + + The test case to be run. + Returns summary information about the test case run. + + + + A base class that provides default behavior when running a test. This includes support + for skipping tests. + + The type of the test case used by the test framework. Must + derive from . + + + + Initializes a new instance of the class. + + The test that this invocation belongs to. + The message bus to report run status to. + The test class that the test method belongs to. + The arguments to be passed to the test class constructor. + The test method that will be invoked. + The arguments to be passed to the test method. + The skip reason, if the test is to be skipped. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets or sets the exception aggregator used to run code and collect exceptions. + + + + + Gets or sets the task cancellation token source, used to cancel the test run. + + + + + Gets or sets the constructor arguments used to construct the test class. + + + + + Gets or sets the display name of the invoked test. + + + + + Gets or sets the message bus to report run status to. + + + + + Gets or sets the skip reason for the test, if set. + + + + + Gets or sets the test to be run. + + + + + Gets the test case to be run. + + + + + Gets or sets the runtime type of the class that contains the test method. + + + + + Gets or sets the runtime method of the method that contains the test. + + + + + Gets or sets the arguments to pass to the test method when it's being invoked. + + + + + This method is called just after is sent, but before the test class is created. + This method should NEVER throw; any exceptions should be placed into the . + + + + + This method is called just before is sent. + This method should NEVER throw; any exceptions should be placed into the . + + + + + Runs the test. + + Returns summary information about the test that was run. + + + + Override this method to invoke the test. + + The exception aggregator used to run code and collect exceptions. + Returns a tuple which includes the execution time (in seconds) spent running the + test method, and any output that was returned by the test. + + + + The test assembly runner for xUnit.net v2 tests. + + + + + Initializes a new instance of the class. + + The assembly that contains the tests to be run. + The test cases to be run. + The message sink to report diagnostic messages to. + The message sink to report run status to. + The user's requested execution options. + + + + + + + + + + + + + Gets the synchronization context used when potentially running tests in parallel. + If is greater than 0, it creates + and uses an instance of . + + The maximum number of parallel threads. + + + + Ensures the assembly runner is initialized (sets up the collection behavior, + parallelization options, and test orderers from their assembly attributes). + + + + + + + + + + + + + + + + + The test case runner for xUnit.net v2 tests. + + + + + Initializes a new instance of the class. + + The test case to be run. + The display name of the test case. + The skip reason, if the test is to be skipped. + The arguments to be passed to the test class constructor. + The arguments to be passed to the test method. + The message bus to report run status to. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets the list of s that will be used for this test case. + + + + + Gets or sets the arguments passed to the test class constructor + + + + + Gets or sets the display name of the test case + + + + + Gets or sets the skip reason for the test, if set. + + + + + Gets or sets the runtime type for the test class that the test method belongs to. + + + + + Gets of sets the runtime method for the test method that the test case belongs to. + + + + + Gets or sets the arguments to pass to the test method when it's being invoked. + + + + + Creates the instance for the given test case. + + + + + Creates the test runner used to run the given test. + + + + + Gets the list of attributes that apply to this test case. + + + + + + + + The test class runner for xUnit.net v2 tests. + + + + + Initializes a new instance of the class. + + The test class to be run. + The test class that contains the tests to be run. + The test cases to be run. + The message sink used to send diagnostic messages + The message bus to report run status to. + The test case orderer that will be used to decide how to order the test. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + The mapping of collection fixture types to fixtures. + + + + Gets the fixture mappings that were created during . + + + + + Gets the already initialized async fixtures . + + + + + Creates the instance of a class fixture type to be used by the test class. If the fixture can be created, + it should be placed into the dictionary; if it cannot, then the method + should record the error by calling Aggregator.Add. + + The type of the fixture to be created + + + + + + + + + + + + + + + + + + + + + + The test collection runner for xUnit.net v2 tests. + + + + + Initializes a new instance of the class. + + The test collection that contains the tests to be run. + The test cases to be run. + The message sink used to send diagnostic messages + The message bus to report run status to. + The test case orderer that will be used to decide how to order the test. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets the fixture mappings that were created during . + + + + + Gets the message sink used to send diagnostic messages. + + + + + + + + + + + Creates the instance of a collection fixture type to be used by the test collection. If the fixture can be created, + it should be placed into the dictionary; if it cannot, then the method + should record the error by calling Aggregator.Add. + + The type of the fixture to be created + + + + Gives an opportunity to override test case orderer. By default, this method gets the + orderer from the collection definition. If this function returns null, the + test case orderer passed into the constructor will be used. + + + + + + + + The test invoker for xUnit.net v2 tests. + + + + + Initializes a new instance of the class. + + The test that this invocation belongs to. + The message bus to report run status to. + The test class that the test method belongs to. + The arguments to be passed to the test class constructor. + The test method that will be invoked. + The arguments to be passed to the test method. + The list of s for this test invocation. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets the list of s for this test invocation. + + + + + + + + + + + + + + The test method runner for xUnit.net v2 tests. + + + + + Initializes a new instance of the class. + + The test method to be run. + The test class that contains the test method. + The test method that contains the tests to be run. + The test cases to be run. + The message sink used to send diagnostic messages to. + The message bus to report run status to. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + The constructor arguments for the test class. + + + + + + + The test runner for xUnit.net v2 tests. + + + + + Initializes a new instance of the class. + + The test that this invocation belongs to. + The message bus to report run status to. + The test class that the test method belongs to. + The arguments to be passed to the test class constructor. + The test method that will be invoked. + The arguments to be passed to the test method. + The skip reason, if the test is to be skipped. + The list of s for this test. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets the list of s for this test. + + + + + + + + Override this method to invoke the test method. + + The exception aggregator used to run code and collect exceptions. + Returns the execution time (in seconds) spent running the test method. + + + + The test case runner for xUnit.net v2 theories (which could not be pre-enumerated; + pre-enumerated test cases use ). + + + + + Initializes a new instance of the class. + + The test case to be run. + The display name of the test case. + The skip reason, if the test is to be skipped. + The arguments to be passed to the test class constructor. + The message sink used to send diagnostic messages + The message bus to report run status to. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets the message sink used to report messages. + + + + + + + + + + + + + + The default implementation of . + + + + + + + + Initializes a new instance of the class. + + The test assembly. + The optional configuration filename (defaults to the + configuration file of the current app domain if not provided) + The version number of the assembly (defaults to "0.0.0.0") + + + + + + + + + + Gets or sets the assembly version. + + + + + + + + + + + The default implementation of . + + + + + + + + Initializes a new instance of the class. + + The test collection the class belongs to + The test class + + + + + + + + + + + + + + + + An implementation of for . + Compares the fully qualified names of the types. + + + + + The singleton instance of the comparer. + + + + + + + + + + + The default implementation of . + + + + + + + + Initializes a new instance of the class. + + The test assembly the collection belongs to + The optional type which contains the collection definition + The display name for the test collection + + + + + + + + + + + + + + + + + + + + + + An implementation of for . + Compares the IDs of the test collections. + + + + + The singleton instance of the comparer. + + + + + + + + + + + A helper class that gets the list of test collection definitions for a given assembly. + Reports any misconfigurations of the test assembly via the diagnostic message sink. + + + + + Gets the test collection definitions for the given assembly. + + The assembly. + The message sink used to send diagnostic messages + A list of mappings from test collection name to test collection definitions (as + + + + A default implementation of that tracks objects to be + disposed when the framework is disposed. The discoverer and executor are automatically + tracked for disposal, since those interfaces mandate an implementation of . + + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + + + + Gets the message sink used to send diagnostic messages. + + + + + Gets the disposal tracker for the test framework. + + + + + + + + + + + Override this method to provide the implementation of . + + The assembly that is being discovered. + Returns the test framework discoverer. + + + + Override this method to provide the implementation of . + + The assembly that is being executed. + Returns the test framework executor. + + + + + + + + + + A base implementation of that supports test filtering + and runs the discovery process on a thread pool thread. + + + + + Initializes a new instance of the class. + + The test assembly. + The source information provider. + The message sink used to send diagnostic messages + + + + Gets the assembly that's being discovered. + + + + + Gets the message sink used to report diagnostic messages. + + + + + Gets the disposal tracker for the test framework discoverer. + + + + + Get the source code information provider used during discovery. + + + + + + + + + + + Implement this method to create a test class for the given CLR type. + + The CLR type. + The test class. + + + + + + + + + + + + + Core implementation to discover unit tests in a given test class. + + The test class. + Set to true to attempt to include source information. + The message sink to send discovery messages to. + The options used by the test framework during discovery. + Returns true if discovery should continue; false otherwise. + + + + Determines if a type should be used for discovery. Can be used to filter out types that + are not desirable. The default implementation filters out abstract (non-static) classes. + + The type. + Returns true if the type can contain tests; false, otherwise. + + + + Reports a discovered test case to the message bus, after updating the source code information + (if desired). + + + + + + + + + + + + A reusable implementation of which contains the basic behavior + for running tests. + + The type of the test case used by the test framework. Must + derive from . + + + + Initializes a new instance of the class. + + Name of the test assembly. + The source line number information provider. + The message sink to report diagnostic messages to. + + + + Gets the assembly information of the assembly under test. + + + + + Gets the message sink to send diagnostic messages to. + + + + + Gets the disposal tracker for the test framework discoverer. + + + + + Gets the source information provider. + + + + + Override to create a test framework discoverer that can be used to discover + tests when the user asks to run all test. + + The test framework discoverer + + + + + + + + + + + + + + + + Override to run test cases. + + The test cases to be run. + The message sink to report run status to. + The user's requested execution options. + + + + This class proxies for the real implementation of , based on + whether the user has overridden the choice via . If + no attribute is found, defaults to . + + + + + Initializes a new instance of the class. + + The test assembly (expected to implement ). + The source information provider (expected to implement ). + The diagnostic message sink (expected to implement ). + + + + Gets the test framework that's being wrapped by the proxy. + + + + + + + + + + + + + + + + + INTERNAL CLASS. DO NOT USE. + + + + + + + + + + + + + + The default implementation of . + + + + + + + + Initializes a new instance of the class. + + The test class + The test method + + + + + + + + + + + + + + + + An implementation of for . + Compares the names of the methods. + + + + + The singleton instance of the comparer. + + + + + + + + + + + A base class implementation of which is based on test cases being + related directly to test methods. + + + + + Used for de-serialization. + + + + + Initializes a new instance of the class. + + Default method display to use (when not customized). + The test method this test case belongs to. + The arguments for the test method. + + + + Initializes a new instance of the class. + + Default method display to use (when not customized). + Default method display options to use (when not customized). + The test method this test case belongs to. + The arguments for the test method. + + + + Returns the base display name for a test ("TestClassName.MethodName"). + + + + + Returns the default method display to use (when not customized). + + + + + Returns the default method display options to use (when not customized). + + + + + + + + Gets or sets the exception that happened during initialization. When this is set, then + the test execution should fail with this exception. + + + + + + + + Gets the generic types that were used to close the generic test method, if + applicable; null, if the test method was not an open generic. + + + + + + + + + + + + + + + + + + + + + + + + + + Call to ensure the object is fully initialized(). + + + + + Gets the unique ID for the test case. + + + + Converts an array of bytes to its hexadecimal value as a string. + The bytes. + A string containing the hexadecimal representation of the provided bytes. + + + Gets a hexadecimal digit character from the 4-bit value. + A value in the range [0, 15]. + A character in the range ['0','9'] or ['a','f']. + + + + Called when initializing the test cases, either after constructor or de-serialization. + Override this method to add additional initialization-time work. + + + + + + + + + + + Default implementation of . + + + + + Gets the output provided by the test. + + + + + Initialize the test output helper with information about a test. + + + + + Resets the test output helper to its uninitialized state. + + + + + + + + + + + Thrown if a test exceeds the specified timeout. + + + + + Initializes a new instance of . + + The timeout that was exceeded, in milliseconds + + + + Implementation of that supports finding test cases + on methods decorated with . + + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + + + + Gets the message sink to be used to send diagnostic messages. + + + + + + + + Creates test cases for a single row of data. By default, returns a single instance of + with the data row inside of it. + + The discovery options to be used. + The test method the test cases belong to. + The theory attribute attached to the test method. + The row of data for this test case. + The test cases + + + + + + + Creates test cases for a skipped theory. By default, returns a single instance of + (which inherently discovers the skip reason via the fact attribute). + + The discovery options to be used. + The test method the test cases belong to. + The theory attribute attached to the test method. + The skip reason that decorates . + The test cases + + + + + + + Creates test cases for the entire theory. This is used when one or more of the theory data items + are not serializable, or if the user has requested to skip theory pre-enumeration. By default, + returns a single instance of , which performs the data discovery + at runtime. + + The discovery options to be used. + The test method the test cases belong to. + The theory attribute attached to the test method. + The test case + + + + + + + Creates test cases for a single row of skipped data. By default, returns a single instance of + with the data row inside of it. + + If this method is overridden, the implementation will have to override otherwise + the default behavior will look at the and the test case will not be skipped. + The discovery options to be used. + The test method the test cases belong to. + The theory attribute attached to the test method. + The row of data for this test case. + The reason this test case is to be skipped + The test cases + + + + Discover test cases from a test method. + + + This method performs the following steps: + - If the theory attribute is marked with Skip, returns the single test case from ; + - If pre-enumeration is off, or any of the test data is non serializable, returns the single test case from ; + - If there is no theory data, returns a single test case of with the error in it; + - Otherwise, it returns one test case per data row, created by calling or if the data attribute has a skip reason. + + The discovery options to be used. + The test method the test cases belong to. + The theory attribute attached to the test method. + Returns zero or more test cases represented by the test method. + + + + Represents a test case that had a valid data row, but the data row was generated by a data attribute with the skip property set. + + This class is only ever used if the discoverer is pre-enumerating theories and the data row is serializable. + + + + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + Default method display to use (when not customized). + The test method this test case belongs to. + The reason that this test case will be skipped + The arguments for the test method. + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + Default method display to use (when not customized). + Default method display options to use (when not customized). + The test method this test case belongs to. + The reason that this test case will be skipped + The arguments for the test method. + + + + + + + + + + + + + An implementation of for xUnit v2. + + + + + Initializes a new instance of the class. + + The test case this test belongs to. + The display name for this test. + + + + + + + Gets the xUnit v2 test case. + + + + + + + + Default implementation of for xUnit v2 that supports tests decorated with + both and . + + + + + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + Default method display to use (when not customized). + The test method this test case belongs to. + The arguments for the test method. + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + Default method display to use (when not customized). + Default method display options to use (when not customized). + The test method this test case belongs to. + The arguments for the test method. + + + + Gets the message sink used to report messages. + + + + + + + + Gets the display name for the test case. Calls + with the given base display name (which is itself either derived from , + falling back to . + + The fact attribute the decorated the test case. + The base display name from . + The display name for the test case. + + + + Gets the skip reason for the test case. By default, pulls the skip reason from the + property. + + The fact attribute the decorated the test case. + The skip reason, if skipped; null, otherwise. + + + + Gets the timeout for the test case. By default, pulls the skip reason from the + property. + + The fact attribute the decorated the test case. + The timeout in milliseconds, if set; 0, if unset. + + + + + + + + + + + + + + + + The implementation of that supports discovery and + execution of unit tests linked against xunit.core.dll, using xunit.execution.dll. + + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + + + + + + + + + + The implementation of that supports discovery + of unit tests linked against xunit.core.dll, using xunit.execution.dll. + + + + + Gets the display name of the xUnit.net v2 test framework. + + + + + Initializes a new instance of the class. + + The test assembly. + The source information provider. + The message sink used to send diagnostic messages + The test collection factory used to look up test collections. + + + + Gets the mapping dictionary of fact attribute type to discoverer type. + + + + + Gets the test collection factory that makes test collections. + + + + + + + + Finds the tests on a test method. + + The test method. + Set to true to indicate that source information should be included. + The message bus to report discovery messages to. + The options used by the test framework during discovery. + Return true to continue test discovery, false, otherwise. + + + + + + + Gets the test case discover instance for the given discoverer type. The instances are cached + and reused, since they should not be stateful. + + The discoverer type. + Returns the test case discoverer instance. + + + + + + + The implementation of that supports execution + of unit tests linked against xunit.core.dll, using xunit.execution.dll. + + + + + Initializes a new instance of the class. + + Name of the test assembly. + The source line number information provider. + The message sink to report diagnostic messages to. + + + + Gets the test assembly that contains the test. + + + + + + + + + + + + + + Represents a test case which runs multiple tests for theory data, either because the + data was not enumerable or because the data was not serializable. + + + + + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + Default method display to use (when not customized). + The method under test. + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + Default method display to use (when not customized). + Default method display options to use (when not customized). + The method under test. + + + + + + + An implementation of which runs work on custom threads + rather than in the thread pool, and limits the number of in-flight actions. + + + + + Initializes a new instance of the class. + + The maximum number of tasks to run at any one time. + + + + Gets a flag indicating whether maximum concurrency is supported. + + + + + + + + + + + + + + This is an internal class, and is not intended to be called from end-user code. + + + + + + + + + + + + + + Implementation of that delegates to another implementation of + while calling into a callback for each message. + + + + + Initializes a new instance of the class. + + The message bus to delegate to. + The callback to send messages to. + + + + + + + + + + Implementation of that delegates to another implementation of + while calling into a callback for each message. In addition, + it issues a event when a message of the type + is seen. + + The type of the T final message. + + + + Initializes a new instance of the class. + + The message bus to delegate to. + The callback to send messages to. + + + + The final message that was seen that caused to be triggered. + + + + + An event that is triggered when a message of type is seen. + + + + + + + + Implementation of that delegates to another implementation of + while calling into a callback for each message. + + + + + Initializes a new instance of the class. + + The inner message sink. + The callback. + + + + + + + + + + Implementation of that delegates to another implementation of + while calling into a callback for each message. In addition, + it issues a event when a message of the type + is seen. + + The type of the T final message. + + + + Initializes a new instance of the class. + + The inner message sink. + The callback. + + + + The final message that was seen that caused to be triggered. + + + + + An event that is triggered when a message of type is seen. + + + + + + + + Reflection-based implementation of . + + + + + Initializes a new instance of the class. + + The assembly to be wrapped. + + + + Initializes a new instance of the class. + + The assembly to be wrapped. + + + + + + + + + + + + + + + + + + + + + + + + + Reflection-based implementation of . + + + + + Initializes a new instance of the class. + + The attribute to be wrapped. + + + + + + + + + + + + + + + + + + + + + + Reflection-based implementation of . + + + + + Initializes a new instance of the class. + + The method to be wrapped. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Reflection-based implementation of . + + + + + Initializes a new instance of the class. + + The parameter to be wrapped. + + + + + + + + + + + + + Reflection-based implementation of . + + + + + Initializes a new instance of the class. + + The type to wrap. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Wrapper to implement types from xunit.abstractions.dll using reflection. + + + + + Converts arguments into their target types. Can be particularly useful when pulling attribute + constructor arguments, whose types may not strictly match the parameter types. + + The arguments to be converted. + The target types for the conversion. + The converted arguments. + + + + Converts an into an . + + The assembly to wrap. + The wrapper + + + + Converts an into an using reflection. + + The attribute to wrap. + The wrapper + + + + Converts a into an using reflection. + + The method to wrap + The wrapper + + + + Converts a into an using reflection. + + THe parameter to wrap + The wrapper + + + + Converts a into an using reflection. + + The type to wrap + The wrapper + + + + This is an internal class, and is not intended to be called from end-user code. + + + + + + + + + + + + + + INTERNAL CLASS. DO NOT USE. + + + + + + + + INTERNAL CLASS. DO NOT USE. + + + + + + + + Represents an exception that happened during the process of a test class. This typically + means there were problems identifying the correct test class constructor, or problems + creating the fixture data for the test class. + + + + + Initializes a new instance of the class. + + The exception message. + + + + + + + + + + + + + The implementation of that supports attributes + of type . + + + + + + + + A helper class to retrieve the traits from a method. + + + + + Get the traits from a method. + + The member (method, field, etc.) to get the traits for. + A list of traits that are defined on the method. + + + + Extension methods for . + + + + + Converts a type into a name string. + + The type to convert. + Name string of type. + + + + Resolves argument values for the test method, including support for optional method + arguments. + + The test method to resolve. + The user-supplied method arguments. + The argument values + + + + Formulates the extended portion of the display name for a test method. For tests with no arguments, this will + return just the base name; for tests with arguments, attempts to format the arguments and appends the argument + list to the test name. + + The test method + The base part of the display name + The test method arguments + The test method's generic types + The full display name for the test method + + + + Resolves an individual generic type given an intended generic parameter type and the type of an object passed to that type. + + The generic type, e.g. T, to resolve. + The non-generic or open generic type, e.g. T, to try to match with the type of the object passed to that type. + The non-generic or closed generic type, e.g. string, used to resolve the method parameter. + The resolved type, e.g. the parameters (T, T, string, typeof(object)) -> (T, T, string, typeof(string)). + True if resolving was successful, else false. + + + + Gets the ElementType of a type, only if it is an array. + + The type to get the ElementType of. + If type is an array, the ElementType of the type, else the original type. + + + + Gets the underlying ElementType of a type, if the ITypeInfo supports reflection. + + The type to get the ElementType of. + A flag indicating whether the type is an array. + If type has an element type, underlying ElementType of a type, else the original type. + + + + Resolves an individual generic type given an intended generic parameter type and the type of an object passed to that type. + + The generic type, e.g. T, to resolve. + The non-generic or closed generic type, e.g. string, used to resolve the method parameter. + The generic arguments of the open generic type to match with the passed parameter. + The resolved type. + True if resolving was successful, else false. + + + + Resolves a generic type for a test method. The test parameters (and associated parameter infos) are + used to determine the best matching generic type for the test method that can be satisfied by all + the generic parameters and their values. + + The generic type to be resolved + The parameter values being passed to the test method + The parameter infos for the test method + The best matching generic type + + + + Resolves all the generic types for a test method. The test parameters are used to determine + the best matching generic types for the test method that can be satisfied by all + the generic parameters and their values. + + The test method + The parameter values being passed to the test method + The best matching generic types + + + base implementation of MD4 family style digest as outlined in + "Handbook of Applied Cryptography", pages 344 - 347. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + implementation of SHA-1 as outlined in "Handbook of Applied Cryptography", pages 346 - 349. + + It is interesting to ponder why the, apart from the extra IV, the other difference here from MD5 + is the "endianness" of the word processing! + + + + + + + Copy constructor. This will copy the state of the provided + message digest. + + + + + + + + + + + + reset the chaining variables + + + + + + + Utility classes for dealing with Exception objects. + + + + + Combines multiple levels of messages into a single message. + + The failure information from which to get the messages. + The combined string. + + + + Combines multiple levels of stack traces into a single stack trace. + + The failure information from which to get the stack traces. + The combined string. + + + + Unwraps exceptions and their inner exceptions. + + The exception to be converted. + The failure information. + + + + An implementation of and that + ignores all messages. + + + + + + + + + + + + + + Serializes and de-serializes objects + + + + + De-serializes an object. + + The type of the object + The object's serialized value + The de-serialized object + + + + Serializes an object. + + The value to serialize + The serialized value + + + Gets whether the specified is serializable with . + The object to test for serializability. + true if the object can be serialized; otherwise, false. + + + + Converts an assembly qualified type name into a object. + + The assembly qualified type name. + The instance of the , if available; null, otherwise. + + + + Converts an assembly name + type name into a object. + + The assembly name. + The type name. + The instance of the , if available; null, otherwise. + + + + Gets an assembly qualified type name for serialization, with special dispensation for types which + originate in the execution assembly. + + + + + Retrieves a substring from the string, with whitespace trimmed on both ends. + + The string. + The starting index. + The length. + + A substring starting no earlier than startIndex and ending no later + than startIndex + length. + + + + + Default implementation of . + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of and . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message to send + + + + Initializes a new instance of the class. + + The format of the message to send + The arguments used to format the message + + + + + + + + + + Default implementation of . + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Formats arguments for display in theories. + + + + + Format the value for presentation. + + The value to be formatted. + + + The formatted value. + + + + Format the value for presentation. + + The value to be formatted. + + The formatted value. + + + + Default implementation of used by the xUnit.net equality assertions. + + The type that is being compared. + + + + Initializes a new instance of the class. + + The inner comparer to be used when the compared objects are enumerable. + + + + + + + + + + + + + A class that wraps to create . + + The type that is being compared. + + + + Initializes a new instance of the class. + + The comparer that is being adapted. + + + + + + + + + + Gets the substitution token used as assembly name suffix to indicate that the assembly is + a generalized reference to the platform-specific assembly. + + + + + Base class for all long-lived objects that may cross over an AppDomain. + + + + + Creates a new instance of the type. + + + + + Disconnects all remote objects. + + + + + + + + A mirror class of the CLR's class. + + + + + Initializes a new instance of the class. + + The data to copy into the serialization info + + + + + + + + + + + + + Returns BASE64 encoded string that represents the entirety of the data. + + + + + Returns a triple for a key/value pair of data in a complex object + + The triple to be serialized + The serialized version of the triple + + + + Returns the triple values out of a serialized triple. + + The serialized triple + The de-serialized triple + + + + De-serializes a value that was serialized with . + + The type of the object to de-serialize into + The serialized value + The de-serialized object + + + + Serializes an object. + + The value to be serialized + The serialized object + + + + Represents a triple of information used when serializing complex types: the property name, + the value to be serialized, and the value's type. + + + + + Gets the triple's key + + + + + Gets the triple's value + + + + + Gets the triple's value type + + + + + Initializes a new instance of the class. + + The triple's key + The triple's value + The triple's value type + + + + Rethrows an exception object without losing the existing stack trace information + + The exception to re-throw. + + For more information on this technique, see + http://www.dotnetjunkies.com/WebLog/chris.taylor/archive/2004/03/03/8353.aspx. + The remote_stack_trace string is here to support Mono. + + + + + Unwraps an exception to remove any wrappers, like . + + The exception to unwrap. + The unwrapped exception. + + + + Guard class, used for guard clauses and argument validation + + + + + + + + + + + + + + Methods which help bridge and contain the differences between Type and TypeInfo. + + + + diff --git a/packages/xunit.extensibility.execution.2.4.2/lib/netstandard1.1/xunit.execution.dotnet.dll b/packages/xunit.extensibility.execution.2.4.2/lib/netstandard1.1/xunit.execution.dotnet.dll new file mode 100755 index 000000000..63678068d Binary files /dev/null and b/packages/xunit.extensibility.execution.2.4.2/lib/netstandard1.1/xunit.execution.dotnet.dll differ diff --git a/packages/xunit.extensibility.execution.2.4.2/lib/netstandard1.1/xunit.execution.dotnet.xml b/packages/xunit.extensibility.execution.2.4.2/lib/netstandard1.1/xunit.execution.dotnet.xml new file mode 100755 index 000000000..e2f287666 --- /dev/null +++ b/packages/xunit.extensibility.execution.2.4.2/lib/netstandard1.1/xunit.execution.dotnet.xml @@ -0,0 +1,4214 @@ + + + + xunit.execution.dotnet + + + + + This class represents utility methods needed to supplement the + reflection capabilities provided by the CLR + + + + + Creates an instance of the test class for the given test case. Sends the + and messages as appropriate. + + The test + The type of the test class + The constructor arguments for the test class + The message bus used to send the test messages + The timer used to measure the time taken for construction + The cancellation token source + + + + + Disposes the test class instance. Sends the and + messages as appropriate. + + The test + The test class instance to be disposed + The message bus used to send the test messages + The timer used to measure the time taken for construction + The cancellation token source + + + + Gets methods in the target type that match the protection level of the supplied method + + The type + The method + The reflection method informations that match + + + + Gets all the custom attributes for the given assembly. + + The assembly + The type of the attribute + The matching attributes that decorate the assembly + + + + Gets all the custom attributes for the given attribute. + + The attribute + The type of the attribute to find + The matching attributes that decorate the attribute + + + + Gets all the custom attributes for the method that are of the given type. + + The method + The type of the attribute + The matching attributes that decorate the method + + + + Gets all the custom attributes for the given type. + + The type + The type of the attribute + The matching attributes that decorate the type + + + + Converts an into a , if possible (for example, this + will not work when the test method is based on source code rather than binaries). + + The method to convert + The runtime method, if available; null, otherwise + + + + Converts an into a , if possible (for example, this + will not work when the test class is based on source code rather than binaries). + + The type to convert + The runtime type, if available, null, otherwise + + + + Extension methods for reading and . + + + + + Gets a flag that determines whether diagnostic messages will be emitted. + + + + + Gets a flag that determines whether diagnostic messages will be emitted. If the flag is not present, + returns the default value (false). + + + + + Gets a flag that determines the default display name format for test methods. + + + + + Gets a flag that determines the default display options to format test methods. + + + + + Gets a flag that determines the default display name format for test methods. If the flag is not present, + returns the default value (). + + + + + Gets the options that determine the default display formatting options for test methods. If no options are not present, + returns the default value (). + + + + + Gets a flag that determines whether theories are pre-enumerated. If they enabled, then the + discovery system will return a test case for each row of test data; they are disabled, then the + discovery system will return a single test case for the theory. + + + + + Gets a flag that determines whether theories are pre-enumerated. If enabled, then the + discovery system will return a test case for each row of test data; if disabled, then the + discovery system will return a single test case for the theory. If the flag is not present, + returns the default value (true). + + + + + Gets a flag that determines whether xUnit.net should report test results synchronously. + + + + + Gets a flag that determines whether xUnit.net should report test results synchronously. + If the flag is not set, returns the default value (false). + + + + + Gets a flag that determines whether diagnostic messages will be emitted. + + + + + Gets a flag that determines whether diagnostic messages will be emitted. If the flag is not + present, returns the default value (false). + + + + + Gets a flag to disable parallelization. + + + + + Gets a flag to disable parallelization. If the flag is not present, returns the + default value (false). + + + + + Gets the maximum number of threads to use when running tests in parallel. + + + + + Gets the maximum number of threads to use when running tests in parallel. If set to 0 (or not set), + the value of is used; if set to a value less + than 0, does not limit the number of threads. + + + + + Gets a flag to stop testing on test failure. + + + + + Gets a flag to stop testing on test failure. If the flag is not present, returns the + default value (false). + + + + + Gets a flag that determines whether xUnit.net should report test results synchronously. + + + + + Gets a flag that determines whether xUnit.net should report test results synchronously. + If the flag is not set, returns the default value (false). + + + + + This implementation of allows the developer to track the count + of outstanding "async void" operations, and wait for them all to complete. + + + + + Initializes a new instance of the class. + + The existing synchronization context (may be null). + + + + + + + + + + + + + + + + Returns a task which is signaled when all outstanding operations are complete. + + + + + Default implementation of . Orders tests in + an unpredictable but stable order, so that repeated test runs of the + identical test assembly run tests in the same order. + + + + + Initializes a new instance of the class. + + Message sink to report diagnostic messages to + + + + + + + Default implementation of . Orders tests in + an unpredictable and unstable order, so that repeated test runs of the + identical test assembly run test collections in a random order. + + + + + + + + Tracks disposable objects, and disposes them in the reverse order they were added to + the tracker. + + + + + Add an object to be disposed. + + The object to be disposed. + + + + + + + Represents a caching factory for the types used for extensibility throughout the system. + + + + + Disposes the instances that are contained in the cache. + + + + + Gets an instance of the given type, casting it to , using the provided + constructor arguments. There is a single instance of a given type that is cached and reused, + so classes retrieved from this factory must be stateless and thread-safe. + + The interface type. + The message sink used to send diagnostic messages + The implementation type. + The constructor arguments. Since diagnostic message sinks are optional, + the code first looks for a type that takes the given arguments plus the message sink, and only + falls back to the message sink-less constructor if none was found. + The instance of the type. + + + + Gets a data discoverer. + + The message sink used to send diagnostic messages + The discoverer type + + + + Gets a data discoverer, as specified in a reflected . + + The message sink used to send diagnostic messages + The data discoverer attribute + The data discoverer, if the type is loadable; null, otherwise. + + + + Gets a test case orderer. + + The message sink used to send diagnostic messages + The test case orderer type + + + + Gets a test case orderer, as specified in a reflected . + + The message sink used to send diagnostic messages + The test case orderer attribute. + The test case orderer, if the type is loadable; null, otherwise. + + + + Gets a test collection orderer. + + The message sink used to send diagnostic messages + The test collection orderer type + + + + Gets a test collection orderer, as specified in a reflected . + + The message sink used to send diagnostic messages + The test collection orderer attribute. + The test collection orderer, if the type is loadable; null, otherwise. + + + + Gets a test framework discoverer. + + The message sink used to send diagnostic messages + The test framework type discoverer type + + + + Gets a test framework discoverer, as specified in a reflected . + + The message sink used to send diagnostic messages + The test framework discoverer attribute + + + + Gets a trait discoverer. + + The message sink used to send diagnostic messages + The trait discoverer type + + + + Gets a trait discoverer, as specified in a reflected . + + The message sink used to send diagnostic messages + The trait discoverer attribute. + The trait discoverer, if the type is loadable; null, otherwise. + + + + Gets an xUnit.net v2 test discoverer. + + The message sink used to send diagnostic messages + The test case discoverer type + + + + Gets an xUnit.net v2 test collection factory. + + The message sink used to send diagnostic messages + The test collection factory type + The test assembly under test + + + + Gets an xUnit.net v2 test collection factory, as specified in a reflected . + + The message sink used to send diagnostic messages + The collection behavior attribute. + The test assembly. + The collection factory. + + + + Implementation of that creates a single + default test collection for the assembly, and places any tests classes without + the into it. + + + + + Initializes a new instance of the class. + + The assembly. + The message sink used to send diagnostic messages + + + + + + + + + + Implementation of which creates a new test + collection for each test class that isn't decorated with . + + + + + Initializes a new instance of the class. + + The assembly info. + The message sink used to send diagnostic messages + + + + + + + + + + Represents a formatter that formats the display name of a class and/or method into a more + human readable form using additional options. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The used by the formatter. + The used by the formatter. + + + + Formats the specified display name. + + The display name to format. + The formatted display name. + + + + A simple implementation of that can be used to report an error + rather than running a test. + + + + + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + Default method display to use (when not customized). + The test method. + The error message to report for the test. + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + Default method display to use (when not customized). + Default method display options to use (when not customized). + The test method. + The error message to report for the test. + + + + Gets the error message that will be display when the test is run. + + + + + + + + + + + + + + Measures and aggregates execution time of one or more actions. + + + + + Returns the total time aggregated across all the actions. + + + + + Executes an action and aggregates its run time into the total. + + The action to measure. + + + + Executes an asynchronous action and aggregates its run time into the total. + + The action to measure. + + + + Aggregates a time span into the total time. + + The time to add. + + + + Implementation of that supports finding test cases + on methods decorated with . + + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + + + + Gets the message sink used to report messages. + + + + + Creates a single for the given test method. + + The discovery options to be used. + The test method. + The attribute that decorates the test method. + + + + + Discover test cases from a test method. By default, if the method is generic, or + it contains arguments, returns a single ; + otherwise, it returns the result of calling . + + The discovery options to be used. + The test method the test cases belong to. + The fact attribute attached to the test method. + Returns zero or more test cases represented by the test method. + + + + An implementation of to support . + + + + + Initializes a new instance of the class. + + The test case that the lambda represents. + The message bus to report run status to. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + + + + A base class that provides default behavior when running tests in an assembly. It groups the tests + by test collection, and then runs the individual test collections. + + The type of the test case used by the test framework. Must + derive from . + + + + Initializes a new instance of the class. + + The assembly that contains the tests to be run. + The test cases to be run. + The message sink to report diagnostic messages to. + The message sink to report run status to. + The user's requested execution options. + + + + Gets or sets the exception aggregator used to run code and collect exceptions. + + + + + Gets or sets the user's requested execution options. + + + + + Gets or sets the message sink to report diagnostic messages to. + + + + + Gets or sets the message sink to report run status to. + + + + + Gets or sets the assembly that contains the tests to be run. + + + + + Gets or sets the test case orderer that will be used to decide how to order the tests. + + + + + Gets or sets the test collection orderer that will be used to decide how to order the test collections. + + + + + Gets or sets the test cases to be run. + + + + + + + + Override this to provide the display name for the test framework (f.e., "xUnit.net 2.0"). + This value is placed into . + + + + + Override this to provide the environment information (f.e., "32-bit .NET 4.0"). This value is + placed into . + + + + + This method is called just after is sent, but before any test collections are run. + This method should NEVER throw; any exceptions should be placed into the . + + + + + This method is called just before is sent. + This method should NEVER throw; any exceptions should be placed into the . + + + + + Creates the message bus to be used for test execution. By default, it inspects + the options for the + flag, and if present, creates a message bus that ensures all messages are delivered + on the same thread. + + The message bus. + + + + Orders the test collections using the . + + Test collections (and the associated test cases) in run order + + + + Runs the tests in the test assembly. + + Returns summary information about the tests that were run. + + + + Runs the list of test collections. By default, groups the tests by collection and runs them synchronously. + + The message bus to report run status to. + The task cancellation token source, used to cancel the test run. + Returns summary information about the tests that were run. + + + + Override this method to run the tests in an individual test collection. + + The message bus to report run status to. + The test collection that is being run. + The test cases to be run. + The task cancellation token source, used to cancel the test run. + Returns summary information about the tests that were run. + + + + A base class that provides default behavior when running test cases. + + The type of the test case used by the test framework. Must + derive from . + + + + Initializes a new instance of the class. + + The test case to be run. + The message bus to report run status to. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets or sets the exception aggregator used to run code and collect exceptions. + + + + + Gets or sets the task cancellation token source, used to cancel the test run. + + + + + Gets or sets the message bus to report run status to. + + + + + Gets or sets the test case to be run. + + + + + This method is called just after is sent, but before any test collections are run. + This method should NEVER throw; any exceptions should be placed into the . + + + + + This method is called just before is sent. + This method should NEVER throw; any exceptions should be placed into the . + + + + + Runs the tests in the test case. + + Returns summary information about the tests that were run. + + + + Override this method to run the tests in an individual test method. + + Returns summary information about the tests that were run. + + + + A base class that provides default behavior when running tests in a test class. It groups the tests + by test method, and then runs the individual test methods. + + The type of the test case used by the test framework. Must + derive from . + + + + Initializes a new instance of the class. + + The test class to be run. + The test class that contains the tests to be run. + The test cases to be run. + The message sink used to send diagnostic messages + The message bus to report run status to. + The test case orderer that will be used to decide how to order the test. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets or sets the exception aggregator used to run code and collect exceptions. + + + + + Gets or sets the task cancellation token source, used to cancel the test run. + + + + + Gets or sets the CLR class that contains the tests to be run. + + + + + Gets the message sink used to send diagnostic messages. + + + + + Gets or sets the message bus to report run status to. + + + + + Gets or sets the test case orderer that will be used to decide how to order the test. + + + + + Gets or sets the test cases to be run. + + + + + Gets or sets the test class to be run. + + + + + Creates the arguments for the test class constructor. Attempts to resolve each parameter + individually, and adds an error when the constructor arguments cannot all be provided. + If the class is static, does not look for constructor, since one will not be needed. + + The test class constructor arguments. + + + + Gets the message to be used when the constructor is missing arguments. + + + + + This method is called just after is sent, but before any test methods are run. + This method should NEVER throw; any exceptions should be placed into the . + + + + + This method is called just before is sent. + This method should NEVER throw; any exceptions should be placed into the . + + + + + Runs the tests in the test class. + + Returns summary information about the tests that were run. + + + + Runs the list of test methods. By default, orders the tests, groups them by method and runs them synchronously. + + Returns summary information about the tests that were run. + + + + Override this method to run the tests in an individual test method. + + The test method that contains the test cases. + The CLR method that contains the tests to be run. + The test cases to be run. + The constructor arguments that will be used to create the test class. + Returns summary information about the tests that were run. + + + + Selects the constructor to be used for the test class. By default, chooses the parameterless + constructor. Override to change the constructor selection logic. + + The constructor to be used for creating the test class. + + + + Tries to supply a test class constructor argument. By default, always fails. Override to + change the argument lookup logic. + + The constructor that will be used to create the test class. + The parameter index. + The parameter information. + The argument value that should be used for the parameter. + Returns true if the argument was supplied; false, otherwise. + + + + A base class that provides default behavior when running tests in a test collection. It groups the tests + by test class, and then runs the individual test classes. + + The type of the test case used by the test framework. Must + derive from . + + + + Initializes a new instance of the class. + + The test collection that contains the tests to be run. + The test cases to be run. + The message bus to report run status to. + The test case orderer that will be used to decide how to order the test. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets or sets the exception aggregator used to run code and collect exceptions. + + + + + Gets or sets the task cancellation token source, used to cancel the test run. + + + + + Gets or sets the message bus to report run status to. + + + + + Gets or sets the test case orderer that will be used to decide how to order the test. + + + + + Gets or sets the test cases to be run. + + + + + Gets or sets the test collection that contains the tests to be run. + + + + + This method is called just after is sent, but before any test classes are run. + This method should NEVER throw; any exceptions should be placed into the . + + + + + This method is called just before is sent. + This method should NEVER throw; any exceptions should be placed into the . + + + + + Runs the tests in the test collection. + + Returns summary information about the tests that were run. + + + + Runs the list of test classes. By default, groups the tests by class and runs them synchronously. + + Returns summary information about the tests that were run. + + + + Override this method to run the tests in an individual test class. + + The test class to be run. + The CLR class that contains the tests to be run. + The test cases to be run. + Returns summary information about the tests that were run. + + + + A base class that provides default behavior to invoke a test method. This includes + support for async test methods (both "async Task" and "async void") as well as + creation and disposal of the test class. + + The type of the test case used by the test framework. Must + derive from . + + + + Initializes a new instance of the class. + + The test that this invocation belongs to. + The message bus to report run status to. + The test class that the test method belongs to. + The arguments to be passed to the test class constructor. + The test method that will be invoked. + The arguments to be passed to the test method. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets or sets the exception aggregator used to run code and collect exceptions. + + + + + Gets or sets the task cancellation token source, used to cancel the test run. + + + + + Gets or sets the constructor arguments used to construct the test class. + + + + + Gets the display name of the invoked test. + + + + + Gets or sets the message bus to report run status to. + + + + + Gets or sets the test to be run. + + + + + Gets the test case to be run. + + + + + Gets or sets the runtime type of the class that contains the test method. + + + + + Gets or sets the runtime method of the method that contains the test. + + + + + Gets or sets the arguments to pass to the test method when it's being invoked. + + + + + Gets or sets the object which measures execution time. + + + + + Creates the test class, unless the test method is static or there have already been errors. Note that + this method times the creation of the test class (using ). It is also responsible for + sending the and + messages, so if you override this method without calling the base, you are responsible for all of this behavior. + This method should NEVER throw; any exceptions should be placed into the . + + The class instance, if appropriate; null, otherwise + + + + This method is called just after the test method has finished executing. + This method should NEVER throw; any exceptions should be placed into the . + + + + + This method is called just before the test method is invoked. + This method should NEVER throw; any exceptions should be placed into the . + + + + + This method calls the test method via reflection. This is an available override point + if you need to do some other form of invocation of the actual test method. + + The instance of the test class + The return value from the test method invocation + + + + Given an object, will determine if it is an instance of (in which case, it is + directly returned), or an instance of + (in which case it is converted), or neither (in which case null is returned). + + The object to convert + + + + Creates the test class (if necessary), and invokes the test method. + + Returns the time (in seconds) spent creating the test class, running + the test, and disposing of the test class. + + + + Invokes the test method on the given test class instance. This method sets up support for "async void" + test methods, ensures that the test method has the correct number of arguments, then calls + to do the actual method invocation. It ensure that any async test method is fully completed before returning, and + returns the measured clock time that the invocation took. + + The test class instance + Returns the time taken to invoke the test method + + + + A base class that provides default behavior when running tests in a test method. + + The type of the test case used by the test framework. Must + derive from . + + + + Initializes a new instance of the class. + + The test method under test. + The CLR class that contains the test method. + The CLR method that contains the tests to be run. + The test cases to be run. + The message bus to report run status to. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets or sets the exception aggregator used to run code and collect exceptions. + + + + + Gets or sets the task cancellation token source, used to cancel the test run. + + + + + Gets or sets the CLR class that contains the test method. + + + + + Gets or sets the message bus to report run status to. + + + + + Gets or sets the CLR method that contains the tests to be run. + + + + + Gets or sets the test cases to be run. + + + + + Gets or sets the test method that contains the test cases. + + + + + This method is called just after is sent, but before any test cases are run. + This method should NEVER throw; any exceptions should be placed into the . + + + + + This method is called just before is sent. + This method should NEVER throw; any exceptions should be placed into the . + + + + + Runs the tests in the test method. + + Returns summary information about the tests that were run. + + + + Runs the list of test cases. By default, it runs the cases in order, synchronously. + + Returns summary information about the tests that were run. + + + + Override this method to run an individual test case. + + The test case to be run. + Returns summary information about the test case run. + + + + A base class that provides default behavior when running a test. This includes support + for skipping tests. + + The type of the test case used by the test framework. Must + derive from . + + + + Initializes a new instance of the class. + + The test that this invocation belongs to. + The message bus to report run status to. + The test class that the test method belongs to. + The arguments to be passed to the test class constructor. + The test method that will be invoked. + The arguments to be passed to the test method. + The skip reason, if the test is to be skipped. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets or sets the exception aggregator used to run code and collect exceptions. + + + + + Gets or sets the task cancellation token source, used to cancel the test run. + + + + + Gets or sets the constructor arguments used to construct the test class. + + + + + Gets or sets the display name of the invoked test. + + + + + Gets or sets the message bus to report run status to. + + + + + Gets or sets the skip reason for the test, if set. + + + + + Gets or sets the test to be run. + + + + + Gets the test case to be run. + + + + + Gets or sets the runtime type of the class that contains the test method. + + + + + Gets or sets the runtime method of the method that contains the test. + + + + + Gets or sets the arguments to pass to the test method when it's being invoked. + + + + + This method is called just after is sent, but before the test class is created. + This method should NEVER throw; any exceptions should be placed into the . + + + + + This method is called just before is sent. + This method should NEVER throw; any exceptions should be placed into the . + + + + + Runs the test. + + Returns summary information about the test that was run. + + + + Override this method to invoke the test. + + The exception aggregator used to run code and collect exceptions. + Returns a tuple which includes the execution time (in seconds) spent running the + test method, and any output that was returned by the test. + + + + The test assembly runner for xUnit.net v2 tests. + + + + + Initializes a new instance of the class. + + The assembly that contains the tests to be run. + The test cases to be run. + The message sink to report diagnostic messages to. + The message sink to report run status to. + The user's requested execution options. + + + + + + + + + + + + + Gets the synchronization context used when potentially running tests in parallel. + If is greater than 0, it creates + and uses an instance of . + + The maximum number of parallel threads. + + + + Ensures the assembly runner is initialized (sets up the collection behavior, + parallelization options, and test orderers from their assembly attributes). + + + + + + + + + + + + + + + + + The test case runner for xUnit.net v2 tests. + + + + + Initializes a new instance of the class. + + The test case to be run. + The display name of the test case. + The skip reason, if the test is to be skipped. + The arguments to be passed to the test class constructor. + The arguments to be passed to the test method. + The message bus to report run status to. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets the list of s that will be used for this test case. + + + + + Gets or sets the arguments passed to the test class constructor + + + + + Gets or sets the display name of the test case + + + + + Gets or sets the skip reason for the test, if set. + + + + + Gets or sets the runtime type for the test class that the test method belongs to. + + + + + Gets of sets the runtime method for the test method that the test case belongs to. + + + + + Gets or sets the arguments to pass to the test method when it's being invoked. + + + + + Creates the instance for the given test case. + + + + + Creates the test runner used to run the given test. + + + + + Gets the list of attributes that apply to this test case. + + + + + + + + The test class runner for xUnit.net v2 tests. + + + + + Initializes a new instance of the class. + + The test class to be run. + The test class that contains the tests to be run. + The test cases to be run. + The message sink used to send diagnostic messages + The message bus to report run status to. + The test case orderer that will be used to decide how to order the test. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + The mapping of collection fixture types to fixtures. + + + + Gets the fixture mappings that were created during . + + + + + Gets the already initialized async fixtures . + + + + + Creates the instance of a class fixture type to be used by the test class. If the fixture can be created, + it should be placed into the dictionary; if it cannot, then the method + should record the error by calling Aggregator.Add. + + The type of the fixture to be created + + + + + + + + + + + + + + + + + + + + + + The test collection runner for xUnit.net v2 tests. + + + + + Initializes a new instance of the class. + + The test collection that contains the tests to be run. + The test cases to be run. + The message sink used to send diagnostic messages + The message bus to report run status to. + The test case orderer that will be used to decide how to order the test. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets the fixture mappings that were created during . + + + + + Gets the message sink used to send diagnostic messages. + + + + + + + + + + + Creates the instance of a collection fixture type to be used by the test collection. If the fixture can be created, + it should be placed into the dictionary; if it cannot, then the method + should record the error by calling Aggregator.Add. + + The type of the fixture to be created + + + + Gives an opportunity to override test case orderer. By default, this method gets the + orderer from the collection definition. If this function returns null, the + test case orderer passed into the constructor will be used. + + + + + + + + The test invoker for xUnit.net v2 tests. + + + + + Initializes a new instance of the class. + + The test that this invocation belongs to. + The message bus to report run status to. + The test class that the test method belongs to. + The arguments to be passed to the test class constructor. + The test method that will be invoked. + The arguments to be passed to the test method. + The list of s for this test invocation. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets the list of s for this test invocation. + + + + + + + + + + + + + + The test method runner for xUnit.net v2 tests. + + + + + Initializes a new instance of the class. + + The test method to be run. + The test class that contains the test method. + The test method that contains the tests to be run. + The test cases to be run. + The message sink used to send diagnostic messages to. + The message bus to report run status to. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + The constructor arguments for the test class. + + + + + + + The test runner for xUnit.net v2 tests. + + + + + Initializes a new instance of the class. + + The test that this invocation belongs to. + The message bus to report run status to. + The test class that the test method belongs to. + The arguments to be passed to the test class constructor. + The test method that will be invoked. + The arguments to be passed to the test method. + The skip reason, if the test is to be skipped. + The list of s for this test. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets the list of s for this test. + + + + + + + + Override this method to invoke the test method. + + The exception aggregator used to run code and collect exceptions. + Returns the execution time (in seconds) spent running the test method. + + + + The test case runner for xUnit.net v2 theories (which could not be pre-enumerated; + pre-enumerated test cases use ). + + + + + Initializes a new instance of the class. + + The test case to be run. + The display name of the test case. + The skip reason, if the test is to be skipped. + The arguments to be passed to the test class constructor. + The message sink used to send diagnostic messages + The message bus to report run status to. + The exception aggregator used to run code and collect exceptions. + The task cancellation token source, used to cancel the test run. + + + + Gets the message sink used to report messages. + + + + + + + + + + + + + + The default implementation of . + + + + + + + + Initializes a new instance of the class. + + The test assembly. + The optional configuration filename (defaults to the + configuration file of the current app domain if not provided) + The version number of the assembly (defaults to "0.0.0.0") + + + + + + + + + + Gets or sets the assembly version. + + + + + + + + + + + The default implementation of . + + + + + + + + Initializes a new instance of the class. + + The test collection the class belongs to + The test class + + + + + + + + + + + + + + + + An implementation of for . + Compares the fully qualified names of the types. + + + + + The singleton instance of the comparer. + + + + + + + + + + + The default implementation of . + + + + + + + + Initializes a new instance of the class. + + The test assembly the collection belongs to + The optional type which contains the collection definition + The display name for the test collection + + + + + + + + + + + + + + + + + + + + + + An implementation of for . + Compares the IDs of the test collections. + + + + + The singleton instance of the comparer. + + + + + + + + + + + A helper class that gets the list of test collection definitions for a given assembly. + Reports any misconfigurations of the test assembly via the diagnostic message sink. + + + + + Gets the test collection definitions for the given assembly. + + The assembly. + The message sink used to send diagnostic messages + A list of mappings from test collection name to test collection definitions (as + + + + A default implementation of that tracks objects to be + disposed when the framework is disposed. The discoverer and executor are automatically + tracked for disposal, since those interfaces mandate an implementation of . + + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + + + + Gets the message sink used to send diagnostic messages. + + + + + Gets the disposal tracker for the test framework. + + + + + + + + + + + Override this method to provide the implementation of . + + The assembly that is being discovered. + Returns the test framework discoverer. + + + + Override this method to provide the implementation of . + + The assembly that is being executed. + Returns the test framework executor. + + + + + + + + + + A base implementation of that supports test filtering + and runs the discovery process on a thread pool thread. + + + + + Initializes a new instance of the class. + + The test assembly. + The source information provider. + The message sink used to send diagnostic messages + + + + Gets the assembly that's being discovered. + + + + + Gets the message sink used to report diagnostic messages. + + + + + Gets the disposal tracker for the test framework discoverer. + + + + + Get the source code information provider used during discovery. + + + + + + + + + + + Implement this method to create a test class for the given CLR type. + + The CLR type. + The test class. + + + + + + + + + + + + + Core implementation to discover unit tests in a given test class. + + The test class. + Set to true to attempt to include source information. + The message sink to send discovery messages to. + The options used by the test framework during discovery. + Returns true if discovery should continue; false otherwise. + + + + Determines if a type should be used for discovery. Can be used to filter out types that + are not desirable. The default implementation filters out abstract (non-static) classes. + + The type. + Returns true if the type can contain tests; false, otherwise. + + + + Reports a discovered test case to the message bus, after updating the source code information + (if desired). + + + + + + + + + + + + A reusable implementation of which contains the basic behavior + for running tests. + + The type of the test case used by the test framework. Must + derive from . + + + + Initializes a new instance of the class. + + Name of the test assembly. + The source line number information provider. + The message sink to report diagnostic messages to. + + + + Gets the assembly information of the assembly under test. + + + + + Gets the message sink to send diagnostic messages to. + + + + + Gets the disposal tracker for the test framework discoverer. + + + + + Gets the source information provider. + + + + + Override to create a test framework discoverer that can be used to discover + tests when the user asks to run all test. + + The test framework discoverer + + + + + + + + + + + + + + + + Override to run test cases. + + The test cases to be run. + The message sink to report run status to. + The user's requested execution options. + + + + This class proxies for the real implementation of , based on + whether the user has overridden the choice via . If + no attribute is found, defaults to . + + + + + Initializes a new instance of the class. + + The test assembly (expected to implement ). + The source information provider (expected to implement ). + The diagnostic message sink (expected to implement ). + + + + Gets the test framework that's being wrapped by the proxy. + + + + + + + + + + + + + + + + + INTERNAL CLASS. DO NOT USE. + + + + + + + + + + + + + + The default implementation of . + + + + + + + + Initializes a new instance of the class. + + The test class + The test method + + + + + + + + + + + + + + + + An implementation of for . + Compares the names of the methods. + + + + + The singleton instance of the comparer. + + + + + + + + + + + A base class implementation of which is based on test cases being + related directly to test methods. + + + + + Used for de-serialization. + + + + + Initializes a new instance of the class. + + Default method display to use (when not customized). + The test method this test case belongs to. + The arguments for the test method. + + + + Initializes a new instance of the class. + + Default method display to use (when not customized). + Default method display options to use (when not customized). + The test method this test case belongs to. + The arguments for the test method. + + + + Returns the base display name for a test ("TestClassName.MethodName"). + + + + + Returns the default method display to use (when not customized). + + + + + Returns the default method display options to use (when not customized). + + + + + + + + Gets or sets the exception that happened during initialization. When this is set, then + the test execution should fail with this exception. + + + + + + + + Gets the generic types that were used to close the generic test method, if + applicable; null, if the test method was not an open generic. + + + + + + + + + + + + + + + + + + + + + + + + + + Call to ensure the object is fully initialized(). + + + + + Gets the unique ID for the test case. + + + + Converts an array of bytes to its hexadecimal value as a string. + The bytes. + A string containing the hexadecimal representation of the provided bytes. + + + Gets a hexadecimal digit character from the 4-bit value. + A value in the range [0, 15]. + A character in the range ['0','9'] or ['a','f']. + + + + Called when initializing the test cases, either after constructor or de-serialization. + Override this method to add additional initialization-time work. + + + + + + + + + + + Default implementation of . + + + + + Gets the output provided by the test. + + + + + Initialize the test output helper with information about a test. + + + + + Resets the test output helper to its uninitialized state. + + + + + + + + + + + Thrown if a test exceeds the specified timeout. + + + + + Initializes a new instance of . + + The timeout that was exceeded, in milliseconds + + + + Implementation of that supports finding test cases + on methods decorated with . + + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + + + + Gets the message sink to be used to send diagnostic messages. + + + + + + + + Creates test cases for a single row of data. By default, returns a single instance of + with the data row inside of it. + + The discovery options to be used. + The test method the test cases belong to. + The theory attribute attached to the test method. + The row of data for this test case. + The test cases + + + + + + + Creates test cases for a skipped theory. By default, returns a single instance of + (which inherently discovers the skip reason via the fact attribute). + + The discovery options to be used. + The test method the test cases belong to. + The theory attribute attached to the test method. + The skip reason that decorates . + The test cases + + + + + + + Creates test cases for the entire theory. This is used when one or more of the theory data items + are not serializable, or if the user has requested to skip theory pre-enumeration. By default, + returns a single instance of , which performs the data discovery + at runtime. + + The discovery options to be used. + The test method the test cases belong to. + The theory attribute attached to the test method. + The test case + + + + + + + Creates test cases for a single row of skipped data. By default, returns a single instance of + with the data row inside of it. + + If this method is overridden, the implementation will have to override otherwise + the default behavior will look at the and the test case will not be skipped. + The discovery options to be used. + The test method the test cases belong to. + The theory attribute attached to the test method. + The row of data for this test case. + The reason this test case is to be skipped + The test cases + + + + Discover test cases from a test method. + + + This method performs the following steps: + - If the theory attribute is marked with Skip, returns the single test case from ; + - If pre-enumeration is off, or any of the test data is non serializable, returns the single test case from ; + - If there is no theory data, returns a single test case of with the error in it; + - Otherwise, it returns one test case per data row, created by calling or if the data attribute has a skip reason. + + The discovery options to be used. + The test method the test cases belong to. + The theory attribute attached to the test method. + Returns zero or more test cases represented by the test method. + + + + Represents a test case that had a valid data row, but the data row was generated by a data attribute with the skip property set. + + This class is only ever used if the discoverer is pre-enumerating theories and the data row is serializable. + + + + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + Default method display to use (when not customized). + The test method this test case belongs to. + The reason that this test case will be skipped + The arguments for the test method. + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + Default method display to use (when not customized). + Default method display options to use (when not customized). + The test method this test case belongs to. + The reason that this test case will be skipped + The arguments for the test method. + + + + + + + + + + + + + An implementation of for xUnit v2. + + + + + Initializes a new instance of the class. + + The test case this test belongs to. + The display name for this test. + + + + + + + Gets the xUnit v2 test case. + + + + + + + + Default implementation of for xUnit v2 that supports tests decorated with + both and . + + + + + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + Default method display to use (when not customized). + The test method this test case belongs to. + The arguments for the test method. + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + Default method display to use (when not customized). + Default method display options to use (when not customized). + The test method this test case belongs to. + The arguments for the test method. + + + + Gets the message sink used to report messages. + + + + + + + + Gets the display name for the test case. Calls + with the given base display name (which is itself either derived from , + falling back to . + + The fact attribute the decorated the test case. + The base display name from . + The display name for the test case. + + + + Gets the skip reason for the test case. By default, pulls the skip reason from the + property. + + The fact attribute the decorated the test case. + The skip reason, if skipped; null, otherwise. + + + + Gets the timeout for the test case. By default, pulls the skip reason from the + property. + + The fact attribute the decorated the test case. + The timeout in milliseconds, if set; 0, if unset. + + + + + + + + + + + + + + + + The implementation of that supports discovery and + execution of unit tests linked against xunit.core.dll, using xunit.execution.dll. + + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + + + + + + + + + + The implementation of that supports discovery + of unit tests linked against xunit.core.dll, using xunit.execution.dll. + + + + + Gets the display name of the xUnit.net v2 test framework. + + + + + Initializes a new instance of the class. + + The test assembly. + The source information provider. + The message sink used to send diagnostic messages + The test collection factory used to look up test collections. + + + + Gets the mapping dictionary of fact attribute type to discoverer type. + + + + + Gets the test collection factory that makes test collections. + + + + + + + + Finds the tests on a test method. + + The test method. + Set to true to indicate that source information should be included. + The message bus to report discovery messages to. + The options used by the test framework during discovery. + Return true to continue test discovery, false, otherwise. + + + + + + + Gets the test case discover instance for the given discoverer type. The instances are cached + and reused, since they should not be stateful. + + The discoverer type. + Returns the test case discoverer instance. + + + + + + + The implementation of that supports execution + of unit tests linked against xunit.core.dll, using xunit.execution.dll. + + + + + Initializes a new instance of the class. + + Name of the test assembly. + The source line number information provider. + The message sink to report diagnostic messages to. + + + + Gets the test assembly that contains the test. + + + + + + + + + + + + + + Represents a test case which runs multiple tests for theory data, either because the + data was not enumerable or because the data was not serializable. + + + + + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + Default method display to use (when not customized). + The method under test. + + + + Initializes a new instance of the class. + + The message sink used to send diagnostic messages + Default method display to use (when not customized). + Default method display options to use (when not customized). + The method under test. + + + + + + + An implementation of which runs work on custom threads + rather than in the thread pool, and limits the number of in-flight actions. + + + + + Initializes a new instance of the class. + + The maximum number of tasks to run at any one time. + + + + Gets a flag indicating whether maximum concurrency is supported. + + + + + + + + + + + + + + This is an internal class, and is not intended to be called from end-user code. + + + + + + + + + + + + + + Implementation of that delegates to another implementation of + while calling into a callback for each message. + + + + + Initializes a new instance of the class. + + The message bus to delegate to. + The callback to send messages to. + + + + + + + + + + Implementation of that delegates to another implementation of + while calling into a callback for each message. In addition, + it issues a event when a message of the type + is seen. + + The type of the T final message. + + + + Initializes a new instance of the class. + + The message bus to delegate to. + The callback to send messages to. + + + + The final message that was seen that caused to be triggered. + + + + + An event that is triggered when a message of type is seen. + + + + + + + + Implementation of that delegates to another implementation of + while calling into a callback for each message. + + + + + Initializes a new instance of the class. + + The inner message sink. + The callback. + + + + + + + + + + Implementation of that delegates to another implementation of + while calling into a callback for each message. In addition, + it issues a event when a message of the type + is seen. + + The type of the T final message. + + + + Initializes a new instance of the class. + + The inner message sink. + The callback. + + + + The final message that was seen that caused to be triggered. + + + + + An event that is triggered when a message of type is seen. + + + + + + + + Reflection-based implementation of . + + + + + Initializes a new instance of the class. + + The assembly to be wrapped. + + + + Initializes a new instance of the class. + + The assembly to be wrapped. + + + + + + + + + + + + + + + + + + + + + + + + + Reflection-based implementation of . + + + + + Initializes a new instance of the class. + + The attribute to be wrapped. + + + + + + + + + + + + + + + + + + + + + + Reflection-based implementation of . + + + + + Initializes a new instance of the class. + + The method to be wrapped. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Reflection-based implementation of . + + + + + Initializes a new instance of the class. + + The parameter to be wrapped. + + + + + + + + + + + + + Reflection-based implementation of . + + + + + Initializes a new instance of the class. + + The type to wrap. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Wrapper to implement types from xunit.abstractions.dll using reflection. + + + + + Converts arguments into their target types. Can be particularly useful when pulling attribute + constructor arguments, whose types may not strictly match the parameter types. + + The arguments to be converted. + The target types for the conversion. + The converted arguments. + + + + Converts an into an . + + The assembly to wrap. + The wrapper + + + + Converts an into an using reflection. + + The attribute to wrap. + The wrapper + + + + Converts a into an using reflection. + + The method to wrap + The wrapper + + + + Converts a into an using reflection. + + THe parameter to wrap + The wrapper + + + + Converts a into an using reflection. + + The type to wrap + The wrapper + + + + This is an internal class, and is not intended to be called from end-user code. + + + + + + + + + + + + + + INTERNAL CLASS. DO NOT USE. + + + + + + + + INTERNAL CLASS. DO NOT USE. + + + + + + + + Represents an exception that happened during the process of a test class. This typically + means there were problems identifying the correct test class constructor, or problems + creating the fixture data for the test class. + + + + + Initializes a new instance of the class. + + The exception message. + + + + + + + + + + The implementation of that supports attributes + of type . + + + + + + + + A helper class to retrieve the traits from a method. + + + + + Get the traits from a method. + + The member (method, field, etc.) to get the traits for. + A list of traits that are defined on the method. + + + + Extension methods for . + + + + + Converts a type into a name string. + + The type to convert. + Name string of type. + + + + Resolves argument values for the test method, including support for optional method + arguments. + + The test method to resolve. + The user-supplied method arguments. + The argument values + + + + Formulates the extended portion of the display name for a test method. For tests with no arguments, this will + return just the base name; for tests with arguments, attempts to format the arguments and appends the argument + list to the test name. + + The test method + The base part of the display name + The test method arguments + The test method's generic types + The full display name for the test method + + + + Resolves an individual generic type given an intended generic parameter type and the type of an object passed to that type. + + The generic type, e.g. T, to resolve. + The non-generic or open generic type, e.g. T, to try to match with the type of the object passed to that type. + The non-generic or closed generic type, e.g. string, used to resolve the method parameter. + The resolved type, e.g. the parameters (T, T, string, typeof(object)) -> (T, T, string, typeof(string)). + True if resolving was successful, else false. + + + + Gets the ElementType of a type, only if it is an array. + + The type to get the ElementType of. + If type is an array, the ElementType of the type, else the original type. + + + + Gets the underlying ElementType of a type, if the ITypeInfo supports reflection. + + The type to get the ElementType of. + A flag indicating whether the type is an array. + If type has an element type, underlying ElementType of a type, else the original type. + + + + Resolves an individual generic type given an intended generic parameter type and the type of an object passed to that type. + + The generic type, e.g. T, to resolve. + The non-generic or closed generic type, e.g. string, used to resolve the method parameter. + The generic arguments of the open generic type to match with the passed parameter. + The resolved type. + True if resolving was successful, else false. + + + + Resolves a generic type for a test method. The test parameters (and associated parameter infos) are + used to determine the best matching generic type for the test method that can be satisfied by all + the generic parameters and their values. + + The generic type to be resolved + The parameter values being passed to the test method + The parameter infos for the test method + The best matching generic type + + + + Resolves all the generic types for a test method. The test parameters are used to determine + the best matching generic types for the test method that can be satisfied by all + the generic parameters and their values. + + The test method + The parameter values being passed to the test method + The best matching generic types + + + base implementation of MD4 family style digest as outlined in + "Handbook of Applied Cryptography", pages 344 - 347. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + implementation of SHA-1 as outlined in "Handbook of Applied Cryptography", pages 346 - 349. + + It is interesting to ponder why the, apart from the extra IV, the other difference here from MD5 + is the "endianness" of the word processing! + + + + + + + Copy constructor. This will copy the state of the provided + message digest. + + + + + + + + + + + + reset the chaining variables + + + + + + + Utility classes for dealing with Exception objects. + + + + + Combines multiple levels of messages into a single message. + + The failure information from which to get the messages. + The combined string. + + + + Combines multiple levels of stack traces into a single stack trace. + + The failure information from which to get the stack traces. + The combined string. + + + + Unwraps exceptions and their inner exceptions. + + The exception to be converted. + The failure information. + + + + An implementation of and that + ignores all messages. + + + + + + + + + + + + + + Serializes and de-serializes objects + + + + + De-serializes an object. + + The type of the object + The object's serialized value + The de-serialized object + + + + Serializes an object. + + The value to serialize + The serialized value + + + Gets whether the specified is serializable with . + The object to test for serializability. + true if the object can be serialized; otherwise, false. + + + + Converts an assembly qualified type name into a object. + + The assembly qualified type name. + The instance of the , if available; null, otherwise. + + + + Converts an assembly name + type name into a object. + + The assembly name. + The type name. + The instance of the , if available; null, otherwise. + + + + Gets an assembly qualified type name for serialization, with special dispensation for types which + originate in the execution assembly. + + + + + Retrieves a substring from the string, with whitespace trimmed on both ends. + + The string. + The starting index. + The length. + + A substring starting no earlier than startIndex and ending no later + than startIndex + length. + + + + + Default implementation of . + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of and . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message to send + + + + Initializes a new instance of the class. + + The format of the message to send + The arguments used to format the message + + + + + + + + + + Default implementation of . + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Formats arguments for display in theories. + + + + + Format the value for presentation. + + The value to be formatted. + + + The formatted value. + + + + Format the value for presentation. + + The value to be formatted. + + The formatted value. + + + + Default implementation of used by the xUnit.net equality assertions. + + The type that is being compared. + + + + Initializes a new instance of the class. + + The inner comparer to be used when the compared objects are enumerable. + + + + + + + + + + + + + A class that wraps to create . + + The type that is being compared. + + + + Initializes a new instance of the class. + + The comparer that is being adapted. + + + + + + + + + + Gets the substitution token used as assembly name suffix to indicate that the assembly is + a generalized reference to the platform-specific assembly. + + + + + Base class for all long-lived objects that may cross over an AppDomain. + + + + + Disconnects all remote objects. + + + + + A mirror class of the CLR's class. + + + + + Initializes a new instance of the class. + + The data to copy into the serialization info + + + + + + + + + + + + + Returns BASE64 encoded string that represents the entirety of the data. + + + + + Returns a triple for a key/value pair of data in a complex object + + The triple to be serialized + The serialized version of the triple + + + + Returns the triple values out of a serialized triple. + + The serialized triple + The de-serialized triple + + + + De-serializes a value that was serialized with . + + The type of the object to de-serialize into + The serialized value + The de-serialized object + + + + Serializes an object. + + The value to be serialized + The serialized object + + + + Represents a triple of information used when serializing complex types: the property name, + the value to be serialized, and the value's type. + + + + + Gets the triple's key + + + + + Gets the triple's value + + + + + Gets the triple's value type + + + + + Initializes a new instance of the class. + + The triple's key + The triple's value + The triple's value type + + + + Rethrows an exception object without losing the existing stack trace information + + The exception to re-throw. + + For more information on this technique, see + http://www.dotnetjunkies.com/WebLog/chris.taylor/archive/2004/03/03/8353.aspx. + The remote_stack_trace string is here to support Mono. + + + + + Unwraps an exception to remove any wrappers, like . + + The exception to unwrap. + The unwrapped exception. + + + + Guard class, used for guard clauses and argument validation + + + + + + + + + + + + + + Methods which help bridge and contain the differences between Type and TypeInfo. + + + + diff --git a/packages/xunit.extensibility.execution.2.4.2/xunit.extensibility.execution.2.4.2.nupkg b/packages/xunit.extensibility.execution.2.4.2/xunit.extensibility.execution.2.4.2.nupkg new file mode 100755 index 000000000..23d88b983 Binary files /dev/null and b/packages/xunit.extensibility.execution.2.4.2/xunit.extensibility.execution.2.4.2.nupkg differ diff --git a/packages/xunit.runner.console.2.4.2/.signature.p7s b/packages/xunit.runner.console.2.4.2/.signature.p7s new file mode 100755 index 000000000..be6c85773 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/.signature.p7s differ diff --git a/packages/xunit.runner.console.2.4.2/_content/logo-128-transparent.png b/packages/xunit.runner.console.2.4.2/_content/logo-128-transparent.png new file mode 100755 index 000000000..9a8896bc0 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/_content/logo-128-transparent.png differ diff --git a/packages/xunit.runner.console.2.4.2/build/xunit.runner.console.props b/packages/xunit.runner.console.2.4.2/build/xunit.runner.console.props new file mode 100755 index 000000000..c25bf2972 --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/build/xunit.runner.console.props @@ -0,0 +1,32 @@ + + + + + $(MSBuildThisFileDirectory)..\tools\net452\xunit.console.exe + $(MSBuildThisFileDirectory)..\tools\net452\xunit.console.x86.exe + + + $(MSBuildThisFileDirectory)..\tools\net452\xunit.console.exe + $(MSBuildThisFileDirectory)..\tools\net452\xunit.console.x86.exe + $(MSBuildThisFileDirectory)..\tools\net46\xunit.console.exe + $(MSBuildThisFileDirectory)..\tools\net46\xunit.console.x86.exe + $(MSBuildThisFileDirectory)..\tools\net461\xunit.console.exe + $(MSBuildThisFileDirectory)..\tools\net461\xunit.console.x86.exe + $(MSBuildThisFileDirectory)..\tools\net462\xunit.console.exe + $(MSBuildThisFileDirectory)..\tools\net462\xunit.console.x86.exe + $(MSBuildThisFileDirectory)..\tools\net47\xunit.console.exe + $(MSBuildThisFileDirectory)..\tools\net47\xunit.console.x86.exe + $(MSBuildThisFileDirectory)..\tools\net471\xunit.console.exe + $(MSBuildThisFileDirectory)..\tools\net471\xunit.console.x86.exe + $(MSBuildThisFileDirectory)..\tools\net472\xunit.console.exe + $(MSBuildThisFileDirectory)..\tools\net472\xunit.console.x86.exe + + + $(MSBuildThisFileDirectory)..\tools\netcoreapp1.0\xunit.console.dll + + + $(MSBuildThisFileDirectory)..\tools\netcoreapp1.0\xunit.console.dll + $(MSBuildThisFileDirectory)..\tools\netcoreapp2.0\xunit.console.dll + + + diff --git a/packages/xunit.runner.console.2.4.2/tools/net452/xunit.abstractions.dll b/packages/xunit.runner.console.2.4.2/tools/net452/xunit.abstractions.dll new file mode 100755 index 000000000..8e2642374 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net452/xunit.abstractions.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net452/xunit.console.exe b/packages/xunit.runner.console.2.4.2/tools/net452/xunit.console.exe new file mode 100755 index 000000000..b723ef119 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net452/xunit.console.exe differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net452/xunit.console.exe.config b/packages/xunit.runner.console.2.4.2/tools/net452/xunit.console.exe.config new file mode 100755 index 000000000..753ed1b18 --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/net452/xunit.console.exe.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/xunit.runner.console.2.4.2/tools/net452/xunit.console.x86.exe b/packages/xunit.runner.console.2.4.2/tools/net452/xunit.console.x86.exe new file mode 100755 index 000000000..fd68d1b2f Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net452/xunit.console.x86.exe differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net452/xunit.console.x86.exe.config b/packages/xunit.runner.console.2.4.2/tools/net452/xunit.console.x86.exe.config new file mode 100755 index 000000000..753ed1b18 --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/net452/xunit.console.x86.exe.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/xunit.runner.console.2.4.2/tools/net452/xunit.runner.reporters.net452.dll b/packages/xunit.runner.console.2.4.2/tools/net452/xunit.runner.reporters.net452.dll new file mode 100755 index 000000000..86dde2e4a Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net452/xunit.runner.reporters.net452.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net452/xunit.runner.utility.net452.dll b/packages/xunit.runner.console.2.4.2/tools/net452/xunit.runner.utility.net452.dll new file mode 100755 index 000000000..47266654a Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net452/xunit.runner.utility.net452.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net46/xunit.abstractions.dll b/packages/xunit.runner.console.2.4.2/tools/net46/xunit.abstractions.dll new file mode 100755 index 000000000..4d9e93069 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net46/xunit.abstractions.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net46/xunit.console.exe b/packages/xunit.runner.console.2.4.2/tools/net46/xunit.console.exe new file mode 100755 index 000000000..73f0de946 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net46/xunit.console.exe differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net46/xunit.console.exe.config b/packages/xunit.runner.console.2.4.2/tools/net46/xunit.console.exe.config new file mode 100755 index 000000000..2b7444ce9 --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/net46/xunit.console.exe.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/xunit.runner.console.2.4.2/tools/net46/xunit.console.x86.exe b/packages/xunit.runner.console.2.4.2/tools/net46/xunit.console.x86.exe new file mode 100755 index 000000000..9911f46b5 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net46/xunit.console.x86.exe differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net46/xunit.console.x86.exe.config b/packages/xunit.runner.console.2.4.2/tools/net46/xunit.console.x86.exe.config new file mode 100755 index 000000000..2b7444ce9 --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/net46/xunit.console.x86.exe.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/xunit.runner.console.2.4.2/tools/net46/xunit.runner.reporters.net452.dll b/packages/xunit.runner.console.2.4.2/tools/net46/xunit.runner.reporters.net452.dll new file mode 100755 index 000000000..f5b3ec4cf Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net46/xunit.runner.reporters.net452.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net46/xunit.runner.utility.net452.dll b/packages/xunit.runner.console.2.4.2/tools/net46/xunit.runner.utility.net452.dll new file mode 100755 index 000000000..b13958e86 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net46/xunit.runner.utility.net452.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net461/xunit.abstractions.dll b/packages/xunit.runner.console.2.4.2/tools/net461/xunit.abstractions.dll new file mode 100755 index 000000000..355f6bf0c Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net461/xunit.abstractions.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net461/xunit.console.exe b/packages/xunit.runner.console.2.4.2/tools/net461/xunit.console.exe new file mode 100755 index 000000000..e23516efc Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net461/xunit.console.exe differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net461/xunit.console.exe.config b/packages/xunit.runner.console.2.4.2/tools/net461/xunit.console.exe.config new file mode 100755 index 000000000..e1edf0bb6 --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/net461/xunit.console.exe.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/xunit.runner.console.2.4.2/tools/net461/xunit.console.x86.exe b/packages/xunit.runner.console.2.4.2/tools/net461/xunit.console.x86.exe new file mode 100755 index 000000000..b435b544c Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net461/xunit.console.x86.exe differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net461/xunit.console.x86.exe.config b/packages/xunit.runner.console.2.4.2/tools/net461/xunit.console.x86.exe.config new file mode 100755 index 000000000..e1edf0bb6 --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/net461/xunit.console.x86.exe.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/xunit.runner.console.2.4.2/tools/net461/xunit.runner.reporters.net452.dll b/packages/xunit.runner.console.2.4.2/tools/net461/xunit.runner.reporters.net452.dll new file mode 100755 index 000000000..6928dd328 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net461/xunit.runner.reporters.net452.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net461/xunit.runner.utility.net452.dll b/packages/xunit.runner.console.2.4.2/tools/net461/xunit.runner.utility.net452.dll new file mode 100755 index 000000000..01bb2d2c7 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net461/xunit.runner.utility.net452.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net462/xunit.abstractions.dll b/packages/xunit.runner.console.2.4.2/tools/net462/xunit.abstractions.dll new file mode 100755 index 000000000..4b3b0a464 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net462/xunit.abstractions.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net462/xunit.console.exe b/packages/xunit.runner.console.2.4.2/tools/net462/xunit.console.exe new file mode 100755 index 000000000..367f814b9 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net462/xunit.console.exe differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net462/xunit.console.exe.config b/packages/xunit.runner.console.2.4.2/tools/net462/xunit.console.exe.config new file mode 100755 index 000000000..8d1c65bed --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/net462/xunit.console.exe.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/xunit.runner.console.2.4.2/tools/net462/xunit.console.x86.exe b/packages/xunit.runner.console.2.4.2/tools/net462/xunit.console.x86.exe new file mode 100755 index 000000000..cdc8f82fc Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net462/xunit.console.x86.exe differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net462/xunit.console.x86.exe.config b/packages/xunit.runner.console.2.4.2/tools/net462/xunit.console.x86.exe.config new file mode 100755 index 000000000..8d1c65bed --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/net462/xunit.console.x86.exe.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/xunit.runner.console.2.4.2/tools/net462/xunit.runner.reporters.net452.dll b/packages/xunit.runner.console.2.4.2/tools/net462/xunit.runner.reporters.net452.dll new file mode 100755 index 000000000..2af73232e Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net462/xunit.runner.reporters.net452.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net462/xunit.runner.utility.net452.dll b/packages/xunit.runner.console.2.4.2/tools/net462/xunit.runner.utility.net452.dll new file mode 100755 index 000000000..b27b1eefd Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net462/xunit.runner.utility.net452.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net47/xunit.abstractions.dll b/packages/xunit.runner.console.2.4.2/tools/net47/xunit.abstractions.dll new file mode 100755 index 000000000..9e8b5e3b6 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net47/xunit.abstractions.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net47/xunit.console.exe b/packages/xunit.runner.console.2.4.2/tools/net47/xunit.console.exe new file mode 100755 index 000000000..4f9b08e0c Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net47/xunit.console.exe differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net47/xunit.console.exe.config b/packages/xunit.runner.console.2.4.2/tools/net47/xunit.console.exe.config new file mode 100755 index 000000000..1d2ff7141 --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/net47/xunit.console.exe.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/xunit.runner.console.2.4.2/tools/net47/xunit.console.x86.exe b/packages/xunit.runner.console.2.4.2/tools/net47/xunit.console.x86.exe new file mode 100755 index 000000000..fd8114f37 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net47/xunit.console.x86.exe differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net47/xunit.console.x86.exe.config b/packages/xunit.runner.console.2.4.2/tools/net47/xunit.console.x86.exe.config new file mode 100755 index 000000000..1d2ff7141 --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/net47/xunit.console.x86.exe.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/xunit.runner.console.2.4.2/tools/net47/xunit.runner.reporters.net452.dll b/packages/xunit.runner.console.2.4.2/tools/net47/xunit.runner.reporters.net452.dll new file mode 100755 index 000000000..c2de20ba5 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net47/xunit.runner.reporters.net452.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net47/xunit.runner.utility.net452.dll b/packages/xunit.runner.console.2.4.2/tools/net47/xunit.runner.utility.net452.dll new file mode 100755 index 000000000..4af85faa8 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net47/xunit.runner.utility.net452.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net471/xunit.abstractions.dll b/packages/xunit.runner.console.2.4.2/tools/net471/xunit.abstractions.dll new file mode 100755 index 000000000..7bb546037 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net471/xunit.abstractions.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net471/xunit.console.exe b/packages/xunit.runner.console.2.4.2/tools/net471/xunit.console.exe new file mode 100755 index 000000000..004ab6948 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net471/xunit.console.exe differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net471/xunit.console.exe.config b/packages/xunit.runner.console.2.4.2/tools/net471/xunit.console.exe.config new file mode 100755 index 000000000..5b0919caa --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/net471/xunit.console.exe.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/xunit.runner.console.2.4.2/tools/net471/xunit.console.x86.exe b/packages/xunit.runner.console.2.4.2/tools/net471/xunit.console.x86.exe new file mode 100755 index 000000000..8c5910818 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net471/xunit.console.x86.exe differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net471/xunit.console.x86.exe.config b/packages/xunit.runner.console.2.4.2/tools/net471/xunit.console.x86.exe.config new file mode 100755 index 000000000..5b0919caa --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/net471/xunit.console.x86.exe.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/xunit.runner.console.2.4.2/tools/net471/xunit.runner.reporters.net452.dll b/packages/xunit.runner.console.2.4.2/tools/net471/xunit.runner.reporters.net452.dll new file mode 100755 index 000000000..150a5497f Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net471/xunit.runner.reporters.net452.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net471/xunit.runner.utility.net452.dll b/packages/xunit.runner.console.2.4.2/tools/net471/xunit.runner.utility.net452.dll new file mode 100755 index 000000000..df8ea41ed Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net471/xunit.runner.utility.net452.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net472/xunit.abstractions.dll b/packages/xunit.runner.console.2.4.2/tools/net472/xunit.abstractions.dll new file mode 100755 index 000000000..142ec7cab Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net472/xunit.abstractions.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net472/xunit.console.exe b/packages/xunit.runner.console.2.4.2/tools/net472/xunit.console.exe new file mode 100755 index 000000000..e8d03cc15 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net472/xunit.console.exe differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net472/xunit.console.exe.config b/packages/xunit.runner.console.2.4.2/tools/net472/xunit.console.exe.config new file mode 100755 index 000000000..00c2115c5 --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/net472/xunit.console.exe.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/xunit.runner.console.2.4.2/tools/net472/xunit.console.x86.exe b/packages/xunit.runner.console.2.4.2/tools/net472/xunit.console.x86.exe new file mode 100755 index 000000000..06fb18738 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net472/xunit.console.x86.exe differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net472/xunit.console.x86.exe.config b/packages/xunit.runner.console.2.4.2/tools/net472/xunit.console.x86.exe.config new file mode 100755 index 000000000..00c2115c5 --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/net472/xunit.console.x86.exe.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/xunit.runner.console.2.4.2/tools/net472/xunit.runner.reporters.net452.dll b/packages/xunit.runner.console.2.4.2/tools/net472/xunit.runner.reporters.net452.dll new file mode 100755 index 000000000..3669c4103 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net472/xunit.runner.reporters.net452.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/net472/xunit.runner.utility.net452.dll b/packages/xunit.runner.console.2.4.2/tools/net472/xunit.runner.utility.net452.dll new file mode 100755 index 000000000..5cd40107f Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/net472/xunit.runner.utility.net452.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.abstractions.dll b/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.abstractions.dll new file mode 100755 index 000000000..a5abed845 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.abstractions.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.console.deps.json b/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.console.deps.json new file mode 100755 index 000000000..50db795c7 --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.console.deps.json @@ -0,0 +1,106 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v1.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v1.0": { + "xunit.console/2.4.2": { + "dependencies": { + "Microsoft.SourceLink.GitHub": "1.1.1", + "Nerdbank.GitVersioning": "3.5.108", + "xunit.runner.reporters": "1.0.0" + }, + "runtime": { + "xunit.console.dll": {} + } + }, + "Microsoft.Build.Tasks.Git/1.1.1": {}, + "Microsoft.SourceLink.Common/1.1.1": {}, + "Microsoft.SourceLink.GitHub/1.1.1": { + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } + }, + "Nerdbank.GitVersioning/3.5.108": {}, + "xunit.abstractions/2.0.3": { + "runtime": { + "lib/netstandard1.0/xunit.abstractions.dll": { + "assemblyVersion": "2.0.0.0", + "fileVersion": "2.0.0.0" + } + } + }, + "xunit.runner.reporters/1.0.0": { + "dependencies": { + "xunit.runner.utility": "1.0.0" + }, + "runtime": { + "xunit.runner.reporters.netcoreapp10.dll": {} + } + }, + "xunit.runner.utility/1.0.0": { + "dependencies": { + "xunit.abstractions": "2.0.3" + }, + "runtime": { + "xunit.runner.utility.netcoreapp10.dll": {} + } + } + } + }, + "libraries": { + "xunit.console/2.4.2": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "Microsoft.Build.Tasks.Git/1.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q==", + "path": "microsoft.build.tasks.git/1.1.1", + "hashPath": "microsoft.build.tasks.git.1.1.1.nupkg.sha512" + }, + "Microsoft.SourceLink.Common/1.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==", + "path": "microsoft.sourcelink.common/1.1.1", + "hashPath": "microsoft.sourcelink.common.1.1.1.nupkg.sha512" + }, + "Microsoft.SourceLink.GitHub/1.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==", + "path": "microsoft.sourcelink.github/1.1.1", + "hashPath": "microsoft.sourcelink.github.1.1.1.nupkg.sha512" + }, + "Nerdbank.GitVersioning/3.5.108": { + "type": "package", + "serviceable": true, + "sha512": "sha512-+1Zn/jrrbBS1MVK20W8d8g4nEREPuZ6IHDTmtqlJiNeGXN45Iou0IPe5hykbLAVyWfnoN3bPCDBIVjeAfoMsWQ==", + "path": "nerdbank.gitversioning/3.5.108", + "hashPath": "nerdbank.gitversioning.3.5.108.nupkg.sha512" + }, + "xunit.abstractions/2.0.3": { + "type": "package", + "serviceable": true, + "sha512": "sha512-pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg==", + "path": "xunit.abstractions/2.0.3", + "hashPath": "xunit.abstractions.2.0.3.nupkg.sha512" + }, + "xunit.runner.reporters/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "xunit.runner.utility/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.console.dll b/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.console.dll new file mode 100755 index 000000000..a1ed27c60 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.console.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.console.dll.config b/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.console.dll.config new file mode 100755 index 000000000..99230ca04 --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.console.dll.config @@ -0,0 +1,7 @@ + + + + + + + diff --git a/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.console.runtimeconfig.json b/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.console.runtimeconfig.json new file mode 100755 index 000000000..232ea58ee --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.console.runtimeconfig.json @@ -0,0 +1,12 @@ +{ + "runtimeOptions": { + "tfm": "netcoreapp1.0", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "1.0.0" + }, + "configProperties": { + "System.Reflection.Metadata.MetadataUpdater.IsSupported": false + } + } +} \ No newline at end of file diff --git a/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.runner.reporters.netcoreapp10.dll b/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.runner.reporters.netcoreapp10.dll new file mode 100755 index 000000000..d6d7e7f74 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.runner.reporters.netcoreapp10.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.runner.utility.netcoreapp10.dll b/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.runner.utility.netcoreapp10.dll new file mode 100755 index 000000000..dd851b748 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.runner.utility.netcoreapp10.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.runner.utility.netcoreapp10.xml b/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.runner.utility.netcoreapp10.xml new file mode 100755 index 000000000..0bd44361d --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/netcoreapp1.0/xunit.runner.utility.netcoreapp10.xml @@ -0,0 +1,4508 @@ + + + + xunit.runner.utility.netcoreapp10 + + + + + This class is used to read configuration information for a test assembly. + + + + + Loads the test assembly configuration for the given test assembly. + + The test assembly. + The test assembly configuration file. + The test assembly configuration. + + + + Loads the test assembly configuration for the given test assembly from a JSON stream. Caller is responsible for opening the stream. + + Stream containing config for an assembly + The test assembly configuration. + + + + This class is used to read configuration information for a test assembly. + + + + + Loads the test assembly configuration for the given test assembly from a JSON stream. Caller is responsible for opening the stream. + + Stream containing config for an assembly + The test assembly configuration. + + + + Loads the test assembly configuration for the given test assembly. + + The test assembly. + The test assembly configuration file. + The test assembly configuration. + + + + INTERNAL CLASS. DO NOT USE. + + + + + + + + + + + INTERNAL CLASS. DO NOT USE. + + + + + + + + + + + INTERNAL INTERFACE. DO NOT USE. + + + + + + + + INTERNAL INTERFACE. DO NOT USE. + + + + + + + + INTERNAL CLASS. DO NOT USE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Interface implemented by runners, passed to , so that the + report can log lines of text to the output device. + + + + + Gets a lock object that can be used to ensure that multiple calls to + log messages will always be grouped together. + + + + + Logs a normal-priority message with stack frame. + + The stack frame information + The message to be logged + + + + Logs a high-priority message with stack frame. + + The stack frame information + The message to be logged + + + + Logs a warning message with stack frame. + + The stack frame information + The message to be logged + + + + Logs an error message with stack frame. + + The stack frame information + The message to be logged + + + + This interface represents a reporter which is invoked by a test runner + during test execution. The report can be explicitly invoked by a command + line switch or implicitly invoked by being environmentally enabled (for + example, a reporter that emits messages for TeamCity). + + + + + Gets the description of the reporter. This is typically used when showing + the user the invocation option for the reporter. + + + + + Gets a value which indicates whether the reporter should be + environmentally enabled. + + + + + Gets a value which indicates a runner switch which can be used + to explicitly enable the runner. If the return value is null, + then the reported can only be environmentally enabled (implicitly). + This value is used either as a command line switch (with the console or + .NET CLI runner) or as a runner configuration value (with the MSBuild runner). + + + + + Creates a message handler that will report messages for the given + test assembly. Ideally, the handler should also implement + for optimal performance, but plain implementations of are supported + for backward compatibility reasons. + + The logger used to send result messages to + The message handler that handles the messages + + + + A message sent to implementations of when + discovery is finished for a test assembly. + + + + + Gets information about the assembly being discovered. + + + + + Gets the options that were used during discovery. + + + + + Gets the number of test cases that were discovered. This is the raw + number of test cases found before filtering is applied by the runner. + + + + + Gets the number of test cases that will be run. This is the number of + test cases found after filtering is applied by the runner. + + + + + A message sent to implementations of when + discovery is starting for a test assembly. + + + + + Gets a flag which indicates whether the tests will be discovered and run in a + separate app domain. + + + + + Gets information about the assembly being discovered. + + + + + Gets the options that will be used during discovery. + + + + + Gets a flag which indicates whether shadow copies are being used. If app domains are + not enabled, then this value is ignored. + + + + + A message sent to implementations of when + execution is finished for a test assembly. + + + + + Gets information about the assembly being discovered. + + + + + Gets the options that were used during execution. + + + + + Gets the summary of the execution results for the test assembly. + + + + + A message sent to implementations of when + execution is starting for a test assembly. + + + + + Gets information about the assembly being discovered. + + + + + Gets the options that will be used during execution. + + + + + A message sent to implementations of when + execution of all test assemblies has completed. + + + + + Gets the clock time elapsed when running the tests. This may different significantly + from the sum of the times reported in the summaries, if the runner chose to run + the test assemblies in parallel. + + + + + Gets the summaries of all the tests run. The key is the display name of the test + assembly; the value is the summary of test execution for that assembly. + + + + + Indicates the level of app domain support that the runner is requesting. + + + + + Requests that app domains be used, if available; if app domains cannot be used, then + the tests will be discovered and run in the runner's app domain. + + + + + Requires that tests be run in the runner's app domain. This is supported by all runners + and all execution libraries. + + + + + Represents a class which acts as a front controller for unit testing frameworks. + This allows runners to run tests from multiple unit testing frameworks (in particular, + hiding the differences between xUnit.net v1 and v2 tests). + + + + + Gets a flag indicating whether this discovery/execution can use app domains. + + + + + An implementation of that always returns no + source information. Useful for test runners which don't need or cannot provide source + information during discovery. + + + + + + + + + + + Represents the configuration items set in the App.config file of a test assembly. + Should be read with the class. + + + + + Gets or sets a flag indicating whether an app domain should be used to discover and run tests. + + + + + Gets or sets a flag indicating whether an app domain should be used to discover and run tests. + If the flag is not set, returns the default value (). + + + + + Gets or sets a flag indicating that the end user wants diagnostic messages + from the test framework. + + + + + Gets a flag indicating that the end user wants diagnostic messages + from the test framework. If the flag is not set, returns the default + value (false). + + + + + Gets or sets a flag indicating that the end user wants internal diagnostic messages + from the test framework. + + + + + Gets a flag indicating that the end user wants internal diagnostic messages + from the test framework. If the flag is not set, returns the default + value (false). + + + + + Gets the number of seconds that a test can run before being considered "long running". Set to a positive + value to enable the feature. + + + + + Gets the number of seconds that a test can run before being considered "long running". If the value is not + set, returns the default value (-1). + + + + + Gets or sets the maximum number of thread to use when parallelizing this assembly. + + + + + Gets the maximum number of thread to use when parallelizing this assembly. + If the value is not set, returns the default value (). + + + + + Gets or sets the default display name for test methods. + + + + + Gets the default display name for test methods. If the value is not set, returns + the default value (). + + + + + Gets or sets the default display options for test methods. + + + + + Gets the default display options for test methods. If the value is not set, returns + the default value (). + + + + + Gets or sets a flag indicating that this assembly is safe to parallelize against + other assemblies. + + + + + Gets a flag indicating that this assembly is safe to parallelize against + other assemblies. If the flag is not set, returns the default value (false). + + + + + Gets or sets a flag indicating that this test assembly wants to run test collections + in parallel against one another. + + + + + Gets a flag indicating that this test assembly wants to run test collections + in parallel against one another. If the flag is not set, returns the default + value (true). + + + + + Gets or sets a flag indicating whether theory data should be pre-enumerated during + test discovery. + + + + + Gets a flag indicating whether theory data should be pre-enumerated during + test discovery. If the flag is not set, returns the default value (true). + + + + + Gets or sets a flag indicating whether shadow copies should be used. + + + + + Gets a flag indicating whether shadow copies should be used. If the flag is not set, + returns the default value (true). + + + + + Gets or sets a flag indicating whether testing should stop on a failure. + + + + + Gets a flag indicating whether testing should stop on a test failure. If the flag is not set, + returns the default value (false). + + + + + Represents options passed to a test framework for discovery or execution. + + + + + Creates an instance of + + The optional configuration to copy values from. + + + + Creates an instance of + + The optional configuration to copy values from. + + + + Gets a value from the options collection. + + The type of the value. + The name of the value. + Returns the value. + + + + Sets a value into the options collection. + + The type of the value. + The name of the value. + The value. + + + + An implementation of for xUnit.net v1. + + + + + Initializes a new instance of the class. + + The filename of the test assembly. + + + + Gets the filename of the test assembly. + + + + + An implementation of , + and for xUnit.net v1 tests. + + + + + Initializes a new instance of the class. + + The assembly under test. + The type under test. + The method under test. + + + + Gets the name of the assembly under test. + + + + + Gets the name of the method under test. + + + + + Gets the name of the type under test. + + + + + Gets the unique ID for the test. + + + + + Collects statistics from running tests. + + + + + A flag that indicates whether or not to continue running tests. + + + + + The total number of tests run. + + + + + The number of tests that failed. + + + + + The number of tests that were skipped. + + + + + The time spent running the tests. + + + + + Aggregates the current results with the other results. + + The other result. + + + + Resets the counted results back to zero. + + + + + An implementation of for xUnit v1. + + + + + Initializes a new instance of the class. + + The test case this test belongs to. + The display name for this test. + + + + + + + + + + An implementation of that adapts xUnit.net v1's XML-based APIs + into xUnit.net v2's object-based APIs. + + + + + + + + Initializes a new instance of the class. + + The assembly under test. + The configuration file name. + The type under test. + The method under test. + The display name of the unit test. + The traits of the unit test. + The skip reason, if the test is skipped. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This class be used to do discovery and execution of xUnit.net v2 tests + using a reflection-based implementation of . + + + + + Initializes a new instance of the class. + + Determines whether tests should be run in a separate app domain. + The source code information provider. + The test assembly. + The test assembly configuration file. + If set to true, runs tests in a shadow copied app domain, which allows + tests to be discovered and run without locking assembly files on disk. + The path on disk to use for shadow copying; if null, a folder + will be automatically (randomly) generated + The message sink which received messages. + Determines whether or not the existence of the test assembly is verified. + + + + + + + + + + + + + Starts the process of running all the xUnit.net v2 tests in the assembly. + + The message sink to report results back to. + The options to be used during test discovery. + The options to be used during test execution. + + + + Starts the process of running the selected xUnit.net v2 tests. + + The test cases to run; if null, all tests in the assembly are run. + The message sink to report results back to. + The options to be used during test execution. + + + + This class be used to do discovery of xUnit.net v2 tests, via any implementation + of , including AST-based runners like CodeRush and + Resharper. Runner authors who are not using AST-based discovery are strongly + encouraged to use instead. + + + + + Initializes a new instance of the class. + + Determines whether tests should be run in a separate app domain. + The source code information provider. + The assembly to use for discovery + The path on disk of xunit.execution.dll; if null, then + the location of xunit.execution.dll is implied based on the location of the test assembly + The path on disk to use for shadow copying; if null, a folder + will be automatically (randomly) generated + The message sink which received messages. + Determines whether or not to check for the existence of assembly files. + + + + Gets a value indicating whether the tests can use app domains (must be linked against desktop execution library). + + + + + Gets the message sink used to report diagnostic messages. + + + + + Returns the test framework from the remote app domain. + + + + + + + + + + + Creates a high performance cross AppDomain message sink that utilizes + which can be passed to and . + + The local message sink to receive the messages. + + + + + + + Starts the process of finding all xUnit.net v2 tests in an assembly. + + Whether to include source file information, if possible. + The message sink to report results back to. + The options used by the test framework during discovery. + + + + Starts the process of finding all xUnit.net v2 tests in a class. + + The fully qualified type name to find tests in. + Whether to include source file information, if possible. + The message sink to report results back to. + The options used by the test framework during discovery. + + + + + + + + + + An implementation of that will provide source information + when running inside of Visual Studio (via the DiaSession class). + + + + + Initializes a new instance of the class. + + The assembly file name. + + + + + + + + + + Default implementation of which supports running tests from + both xUnit.net v1 and v2. + + + + + This constructor is for unit testing purposes only. + + + + + Initializes a new instance of the class. + + Determines whether tests should be run in a separate app domain. + The test assembly. + The test assembly configuration file. + If set to true, runs tests in a shadow copied app domain, which allows + tests to be discovered and run without locking assembly files on disk. + The path on disk to use for shadow copying; if null, a folder + will be automatically (randomly) generated + The source information provider. If null, uses the default (). + The message sink which received messages. + + + + + + + + + + + + + + + + FOR INTERNAL USE ONLY. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Identifies a message that can return its own type information. + + + + + Gets the interface type full names of the implemented interfaces. + + + + + Represents an endpoint for the reception of test messages. This endpoint can have the list of types + of the message passed in to optimize the performance of message dispatching. + + + + + Reports the presence of a message on the message bus with an optional list of message types. + This method should never throw exceptions. + + The message from the message bus. + The list of message types, or null. + Return true to continue running tests, or false to stop. + + + + Represents information about long running tests from . + + + + + Initializes a new instance of the class. + + Configured notification time + Tests + + + + + + + + + + Adapts an implementation of to provide an implementation + of . + + + + + + + + Returns the implemented interface types, if known. + + The message interfaces to retrieve. + The hash set of interfaces, if known; null, otherwise. + + + + + + + + + + Determines whether the given sink is already an implementation of , + and if not, creates a wrapper to adapt it. + + The sink to test, and potentially adapt. + + + + Adapts an implementation of to provide an implementation + of (albeit one without the typical performance + benefits associated with the latter interface). + + + + + + + + + + + + + + Determines whether the given sink is already an implementation of , + and if not, creates a wrapper to adapt it. + + The sink to test, and potentially adapt. + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + Information about the assembly that is being discovered + The discovery options + The number of test cases discovered + The number of test cases to be run + + + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + Information about the assembly that is being discovered + Indicates whether the tests will be discovered and run in a separate app domain + Indicates whether shadow copying is being used + The discovery options + + + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + Information about the assembly that is being discovered + The execution options + The execution summary + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + Information about the assembly that is being discovered + The execution options + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + Represents a set of filters for an . + + + + + Initializes a new instance of the class. + + + + + Gets the set of trait filters for tests to exclude. + + + + + Gets the set of trait filters for tests to include. + + + + + Gets the set of class filters for test classes to exclude. + + + + + Gets the set of class filters for test classes to include. + + + + + Gets the set of method filters for tests to exclude. + + + + + Gets the set of method filters for tests to include. + + + + + Gets the set of assembly filters for tests to exclude. + + + + + Gets the set of assembly filters for tests to include. + + + + + Filters the given method using the defined filter values. + + The test case to filter. + Returns true if the test case passed the filter; returns false otherwise. + + + + FOR INTERNAL USE ONLY. + + + + + + + + + + + + + + + + + + + + + + + Represents an assembly in an . + + + + + Gets or sets the assembly filename. + + + + + Gets or sets the config filename. + + + + + Gets the configuration values read from the test assembly configuration file. + + + + + Gets or sets a value indicating whether to shadow copy the assembly + when running the tests. + + + + + The default implementation of , used + by runners when there is no other overridden reporter. It returns + an instance of . + + + + + + + + + + + + + + + + + Default implementation of used to report + messages for test runners. + + + + + Initializes a new instance of the class. + + The logger used to report messages + + + + Get the logger used to report messages. + + + + + Escapes text for display purposes. + + The text to be escaped + The escaped text + + + + Gets the display name of a test assembly from a test assembly message. + + The test assembly message + The assembly display name + + + + Gets the display name of a test assembly from a test assembly message. + + The test assembly + The assembly display name + + + + Get the test framework options for the given assembly. If it cannot find them, then it + returns a default set of options. + + The test assembly filename + + + + + Logs an error message to the logger. + + The type of the failure + The failure information + + + + Logs a stack trace to the logger. + + + + + Lots test output to the logger. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Writes the default summary to the given logger. Can be used by other reporters who also wish to write the + standard summary information. + + The logger used to send result messages to. + The execution summary to display. + + + + The default implementation of , used + by runners when there is no other overridden reporter. It returns + an instance of . + + + + + + + + + + + + + + + + + Default implementation of used to report + messages for test runners. + + + + + Initializes a new instance of the class. + + The logger used to report messages + + + + Get the logger used to report messages. + + + + + Escapes text for display purposes. + + The text to be escaped + The escaped text + + + + Gets the display name of a test assembly from a test assembly message. + + The test assembly message + The assembly display name + + + + Gets the display name of a test assembly from a test assembly message. + + The test assembly + The assembly display name + + + + Get the test framework options for the given assembly. If it cannot find them, then it + returns a default set of options. + + The test assembly filename + + + + + Logs an error message to the logger. + + The type of the failure + The failure information + + + + Logs a stack trace to the logger. + + + + + Lots test output to the logger. + + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Writes the default summary to the given logger. Can be used by other reporters who also wish to write the + standard summary information. + + The logger used to send result messages to. + The execution summary to display. + + + + A class which makes it simpler for casual runner authors to find and run tests and get results. + + + + + Set to get notification of diagnostic messages. + + + + + Set to get notification of when test discovery is complete. + + + + + Set to get notification of error messages (unhandled exceptions outside of tests). + + + + + Set to get notification of when test execution is complete. + + + + + Set to get notification of failed tests. + + + + + Set to get notification of finished tests (regardless of outcome). + + + + + Set to get real-time notification of test output (for xUnit.net v2 tests only). + Note that output is captured and reported back to all the test completion Info>s + in addition to being sent to this Info>. + + + + + Set to get notification of passing tests. + + + + + Set to get notification of skipped tests. + + + + + Set to get notification of when tests start running. + + + + + Gets the current status of the assembly runner + + + + + Set to be able to filter the test cases to decide which ones to run. If this is not set, + then all test cases will be run. + + + + + Call to request that the current run be cancelled. Note that cancellation may not be + instantaneous, and even after cancellation has been acknowledged, you can expect to + receive all the cleanup-related messages. + + + + + + + + Starts running tests from a single type (if provided) or the whole assembly (if not). This call returns + immediately, and status results are dispatched to the Info>s on this class. Callers can check + to find out the current status. + + The (optional) type name of the single test class to run + Set to true to enable diagnostic messages; set to false to disable them. + By default, uses the value from the assembly configuration file. + Set to choose the default display name style for test methods. + By default, uses the value from the assembly configuration file. (This parameter is ignored for xUnit.net v1 tests.) + Set to choose the default display name style options for test methods. + By default, uses the value from the assembly configuration file. (This parameter is ignored for xUnit.net v1 tests.) + Set to true to pre-enumerate individual theory tests; set to false to use + a single test case for the theory. By default, uses the value from the assembly configuration file. (This parameter is ignored + for xUnit.net v1 tests.) + Set to true to run test collections in parallel; set to false to run them sequentially. + By default, uses the value from the assembly configuration file. (This parameter is ignored for xUnit.net v1 tests.) + Set to 0 to use unlimited threads; set to any other positive integer to limit to an exact number + of threads. By default, uses the value from the assembly configuration file. (This parameter is ignored for xUnit.net v1 tests.) + Set to true to enable internal diagnostic messages; set to false to disable them. + By default, uses the value from the assembly configuration file. + + + + Creates an assembly runner that discovers and runs tests without a separate app domain. + + The test assembly. + + + + An enumeration which describes the current state of the system + + + + The system is not discovering or executing tests + + + The system is discovering tests + + + The system is executing tests + + + + Represents a diagnostic message from the xUnit.net system or third party extension. + + + + + + + + The diagnostic message. + + + + + Represents test discovery being completed. + + + + + + + + The number of test cases that were discovered. + + + + + The number of test cases that will be run, after filtering was applied. + + + + + Represents an error that happened outside the scope of a running test. + + + + + + + + The type of error condition that was encountered. + + + + + The exception that caused the test failure. + + + + + The message from the exception that caused the test failure. + + + + + The stack trace from the exception that caused the test failure. + + + + + An enumeration which indicates the type of error message (for ). + + + + An unhandled exception occurred that disrupted the execution engine + + + An unhandled exception happened while cleaning up from the test assembly + + + An unhandled exception happened while cleaning up from the test collection + + + An unhandled exception happened while cleaning up from the test class + + + An unhandled exception happened while cleaning up from the test method + + + An unhandled exception happened while cleaning up from the test case + + + An unhandled exception happened while cleaning up from the test + + + + Represents test assembly execution being finished. + + + + + + + + The total number of tests in the assembly. + + + + + The number of the tests that failed. + + + + + The number of tests that were skipped. + + + + + The total execution time spent running tests. + + + + + Used to report results when no tests are executed. + + + + + Represents information about a test that was executed. + + + + + + + + The number of seconds the test spent executing. + + + + + The output from the test. + + + + + Represents a test that failed. + + + + + + + + The exception that caused the test failure. + + + + + The message from the exception that caused the test failure. + + + + + The stack trace from the exception that caused the test failure. + + + + + Represents a test that finished, regardless of the result. + + + + + + + + A base class which contains information about a test. + + + + + + + + The fully qualified type name of the class that contains the test. + + + + + The name of the method that contains the test. + + + + + The traits associated with the test. + + + + + The display name for the test. + + + + + The display name of the test collection the test belongs to. + + + + + Represents live test output. + + + + + + + + The output from the test. + + + + + Represents a test that passed. + + + + + + + + Represents a test that was skipped. + + + + + + + + Gets the reason that was given for skipping the test. + + + + + Represents a test that is starting. + + + + + + + + An implementation of which dispatches messages + to one or more individual message sinks. + + + + + The list of event dispatchers that are registered with the system. + + + + + + + + Gets a dispatcher, optionally creating and registering it if it doesn't exist. + + The type of the dispatcher + The dispatcher + The dispatcher + + + + Reports the presence of a message on the message bus with an optional list of message types. + This method should never throw exceptions. + + The message from the message bus. + The list of message types, or null. + Return true to continue running tests, or false to stop. + + + + A delegating implementation of which provides the execution + summary and finished events when appropriate and cancellation support. + + + + + Initializes a new instance of the class. + + The inner sink to pass messages to. + + + + + + + + + + + + + + + + + + A delegating implementation of which converts all + skipped tests into failures before passing them on to the inner sink. + + + + + Initializes a new instance of the class. + + The sink to delegate messages to. + + + + + + + + + + + + + + + + A delegating implementation of which detects and reports when + tests have become long-running (during otherwise idle time). + + + + + Initializes a new instance of the class, with + long running test messages being delivered as instances to the + provided diagnostic message sink. + + The inner sink to delegate to. + The minimum amount of time a test runs to be considered long running. + The message sink to send messages to. + + + + Initializes a new instance of the class, with + long running test messages being delivered as to the + provided callback. + + The inner sink to delegate to. + The minimum amount of time a test runs to be considered long running. + The callback to dispatch messages to. + + + + + + + + + + Returns the current time in UTC. Overrideable for testing purposes. + + + + + + + + + + + Performs a Task-safe delay. Overrideable for testing purposes. + + + + + A delegating implementation of which is responsible for + creating the xUnit.net v2 XML output from the execution test results. This class is + not available in .NET 3.5 because it relies upon XML LINQ. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + + + Escapes a string for placing into the XML. + + The value to be escaped. + The escaped value. + + + + Class that maps diagnostic messages to events. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + + + + + + + Class that maps test framework discovery messages to events. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + + + + + + + Class that maps test framework execution messages to events. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + + + + + + + Represents a handler for a specific . + + The type of the message to be handled. + The message. + + + + Allows cancellation during message handling. + + + + + Gets a value to indicate whether stop has been requested. + + + + + Call to indicate that execution should stop. + + + + + Wraps a specific with the ability to cancel execution. + + The type of the message to be handled. + + + + Initializes a new instance of the class. + + The message to be handled. + + + + Gets the message. + + + + + Class that maps test runner messages to events. + + + + + Occurs when the runner is starting discovery for a given test assembly. + + + + + Occurs when the runner has finished discovery for a given test assembly. + + + + + Occurs when the runner has finished executing the given test assembly. + + + + + Occurs when the runner is starting to execution the given test assembly. + + + + + Occurs when the runner has finished executing all test assemblies. + + + + + + + + + + + Represents an that can also provide execution + information like an . + + + + + Gets the final execution summary, once the execution is finished. + + + + + Gets an event which is signaled once execution is finished. + + + + + An implementation of designed for test discovery for a + single test assembly. The event is triggered when discovery is complete. + + + + + Initializes a new instance of the class. + + An optional thunk which can be used to control cancellation. + + + + The list of discovered test cases. + + + + + Gets an event which is signaled once discovery is finished. + + + + + + + + + + + An implementation of that provides access to events for all + levels of reporting. + + + + + Gets a list of diagnostics events that can be subscribed to. + + + + + Gets a list of discovery events that can be subscribed to. + + + + + Gets a list of execution events that can be subscribed to. + + + + + Gets a list of runner events that can be subscribed to. + + + + + + + + An implementation of which logs messages + to and . + + + + + Initializes a new instance of the class. + + A flag to indicate whether colors should be used when + logging messages. + + + + Initializes a new instance of the class. + + A flag to indicate whether colors should be used when + logging messages. + The lock object used to prevent console clashes. + + + + + + + + + + + + + + + + + + + Collects execution totals for a group of test cases. + + + + + Gets or set the total number of tests run. + + + + + Gets or sets the number of failed tests. + + + + + Gets or sets the number of skipped tests. + + + + + Gets or sets the total execution time for the tests. + + + + + Gets or sets the total errors (i.e., cleanup failures) for the tests. + + + + + Internal helper class for remoting. + + + + + Unregisters any remoting channels. + + + If there are any registered remoting channels, then MarshalByRefObjects + don't work. Based on bug #9749, it's clear that MSTest (at least through + Visual Studio 2010) registers remoting channels when it runs but doesn't + clean them up when it's done. Right now, the only way to reliably surface + this issue is through MSBuild (as per the bug repro), so for the moment + this work-around code is limited to the MSBuild runner. + + + + + Represents the top of a stack frame, typically taken from an exception or failure information. + + + + + Initializes a new instance of the class. + + + + + + + Gets the filename of the stack frame. May be null if the stack frame is not known. + + + + + Returns true if this is an empty stack frame (e.g., ). + + + + + Gets the line number of the stack frame. May be 0 if the stack frame is not known. + + + + + Get a default (unknown) stack frame info. + + + + + Creates a stack frame info from failure information. + + The failure information to inspect + The stack frame info + + + + Creates a tack frame from source information. This can be useful when simulating a + stack frame in a non-exceptional situation (f.e., for a skipped test). + + The source information to inspect + The stack frame info + + + + Transforms stack frames and stack traces into compiler-like output + so they can be double-clicked in Visual Studio. + + + + + Transforms an individual stack frame. + + The stack frame to transform + The default directory used for computing relative paths + The transformed stack frame + + + + Transforms a stack. + + The stack to transform + The default directory used for computing relative paths + The transformed stack + + + + An implementation of which converts all skipped + tests into failures, wrapping an existing + implementation. + + + + + Initializes a new instance of . + + The visitor to pass messages onto. + + + + + + + + + + Represents an implementation of that is specifically used + during test execution. Provides access to the final execution summary, as well as + an event which is triggered when execution is finished. + + + + + Gets the final execution summary, once the execution is finished. + + + + + Gets an event which is signaled once execution is finished. + + + + + + + + + + + + + + + + + An implementation of that provides several Visit methods that + can provide access to specific message types without the burden of casting. + + + + + Dispatches the message to the given callback, if it's of the correct type. + + The message type + The message + The callback + The result of the callback, if called; true, otherwise + + + + Dispatches the message to the given callback, if it's of the correct type. + The callback is provided with both the message and this instance of the visitor. + + The message type + The message + The callback + The result of the callback, if called; true, otherwise + + + + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue discovering/executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue discovering tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue discovering tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + An implementation of that provides several Visit methods that + can provide access to specific message types without the burden of casting. It also records + when it sees a completion message, and sets the event appropriately. + + The type of the completion message. + + + + Initializes a new instance of the class. + + + + + This event is triggered when the completion message has been seen. + + + + + + + + + + + An implementation of which records the + execution summary for an assembly, as well as performing the XML aggregation + duties of . + + + + + Initializes a new instance of . + + The inner message sink to pass messages to. + The dictionary which collects execution summaries for all assemblies. + The root XML assembly element to collect the result XML. + The callback used to determine when to cancel execution. + + + + + + + + + + + + + An implementation of which records all operations into + xUnit.net v2 XML format. + + + + + Initializes a new instance of . + + The root XML assembly element to collect the result XML. + The callback used to determine when to cancel execution. + + + + Gets the callback used to determine when to cancel execution. + + + + + Gets or sets the number of errors that have occurred (outside of actual test execution). + + + + + Gets or sets the number of tests which failed. + + + + + Gets or sets the number of tests which were skipped. + + + + + Gets or sets the time spent executing tests, in seconds. + + + + + Gets or sets the total number of tests, regardless of result. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Escapes a string for placing into the XML. + + The value to be escaped. + The escaped value. + + + + Utility classes for dealing with Exception objects. + + + + + Combines multiple levels of messages into a single message. + + The failure information from which to get the messages. + The combined string. + + + + Combines multiple levels of stack traces into a single stack trace. + + The failure information from which to get the stack traces. + The combined string. + + + + Unwraps exceptions and their inner exceptions. + + The exception to be converted. + The failure information. + + + + Base class for all long-lived objects that may cross over an AppDomain. + + + + + Disconnects all remote objects. + + + + + Serializes and de-serializes objects + + + + + De-serializes an object. + + The type of the object + The object's serialized value + The de-serialized object + + + + Serializes an object. + + The value to serialize + The serialized value + + + Gets whether the specified is serializable with . + The object to test for serializability. + true if the object can be serialized; otherwise, false. + + + + Converts an assembly qualified type name into a object. + + The assembly qualified type name. + The instance of the , if available; null, otherwise. + + + + Converts an assembly name + type name into a object. + + The assembly name. + The type name. + The instance of the , if available; null, otherwise. + + + + Gets an assembly qualified type name for serialization, with special dispensation for types which + originate in the execution assembly. + + + + + Retrieves a substring from the string, with whitespace trimmed on both ends. + + The string. + The starting index. + The length. + + A substring starting no earlier than startIndex and ending no later + than startIndex + length. + + + + + An implementation of and that + ignores all messages. + + + + + + + + + + + + + + Default implementation of . + + + + + + + + + + + + + + + + + Indicates the default display name format for test methods. + + + + + Use a fully qualified name (namespace + class + method) + + + + + Use just the method name (without class) + + + + + Indicates the method display options for test methods. + + + + + Indicates no additional method display options. + + This is the default configuration option. + + + + Replace underscores in display names with a space. + + + + + Replace well-known monikers with their equivalent operator. + + + lt : < + le : <= + eq : = + ne : != + gt : > + ge : >= + + + + + Replace supported escape sequences with their equivalent character. + + + Encoding + Format + + ASCIIX hex-digit hex-digit (ex: X2C) + UnicodeU hex-digit hex-digit hex-digit hex-digit (ex: U00A9) + + + + + + Replaces the period delimiter used in namespace and type references with a comma. + + This option is only honored if the setting is also enabled. + + + + Enables all method display options. + + + + + A mirror class of the CLR's class. + + + + + Initializes a new instance of the class. + + The data to copy into the serialization info + + + + + + + + + + + + + Returns BASE64 encoded string that represents the entirety of the data. + + + + + Returns a triple for a key/value pair of data in a complex object + + The triple to be serialized + The serialized version of the triple + + + + Returns the triple values out of a serialized triple. + + The serialized triple + The de-serialized triple + + + + De-serializes a value that was serialized with . + + The type of the object to de-serialize into + The serialized value + The de-serialized object + + + + Serializes an object. + + The value to be serialized + The serialized object + + + + Represents a triple of information used when serializing complex types: the property name, + the value to be serialized, and the value's type. + + + + + Gets the triple's key + + + + + Gets the triple's value + + + + + Gets the triple's value type + + + + + Initializes a new instance of the class. + + The triple's key + The triple's value + The triple's value type + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message to send + + + + Initializes a new instance of the class. + + The format of the message to send + The arguments used to format the message + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of and . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message to send + + + + Initializes a new instance of the class. + + The format of the message to send + The arguments used to format the message + + + + + + + + + + Default implementation of . + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Extensions methods for . + + + + + Logs a normal-priority message. + + The logger + The message to be logged + + + + Logs a normal-priority formatted message. + + The logger + The format of the message to be logged + The format arguments + + + + Logs a normal-priority formatted message with stack frame. + + The logger + The stack frame information + The format of the message to be logged + The format arguments + + + + Logs a high-priority message. + + The logger + The message to be logged + + + + Logs a high-priority formatted message. + + The logger + The format of the message to be logged + The format arguments + + + + Logs a high-priority formatted message with stack frame. + + The logger + The stack frame information + The format of the message to be logged + The format arguments + + + + Logs a warning message. + + The logger + The message to be logged + + + + Logs a formatted warning message. + + The logger + The format of the message to be logged + The format arguments + + + + Logs a formatted warning message with stack frame. + + The logger + The stack frame information + The format of the message to be logged + The format arguments + + + + Logs an error message. + + The logger + The message to be logged + + + + Logs a formatted error message. + + The logger + The format of the message to be logged + The format arguments + + + + Logs a formatted error message with stack frame. + + The logger + The stack frame information + The format of the message to be logged + The format arguments + + + + Extension methods for . + + + + + Attempts to optimally cast a message to the given message type, using the optional hash of + interface types to improve casting performance. + + The desired destination message type. + The message to test and cast. + The implemented interfaces, if known. + The message as , or null. + + + + Handles a message of a specific type by testing it for the type, as well as verifying that there + is a registered callback; + + The message to dispatch. + The implemented interfaces, if known. + The callback to dispatch the message to. + Returns true if processing should continue; false otherwise. + + + + Extension methods for . + + + + + Provides a simulation of for , + to make it easier to directly dispatch messages from the runner. + + The message sink + The message to be dispatched + The result of calling the message sink + + + + Extension methods for and . + + + + + Starts the process of finding all tests in an assembly. + + The discoverer. + Whether to include source file information, if possible. + The message sink to report results back to. + The options used by the test framework during discovery. + + + + Starts the process of finding all tests in a class. + + The discoverer. + The fully qualified type name to find tests in. + Whether to include source file information, if possible. + The message sink to report results back to. + The options used by the test framework during discovery. + + + + Starts the process of running all the tests in the assembly. + + The executor. + The message sink to report results back to. + The options to be used during test discovery. + The options to be used during test execution. + + + + Starts the process of running selected tests in the assembly. + + The executor. + The test cases to run. + The message sink to report results back to. + The options to be used during test execution. + + + + Extension methods for reading and writing and . + + + + + Gets a flag that determines whether diagnostic messages will be emitted. + + + + + Gets a flag that determines whether internal diagnostic messages will be emitted. + + + + + Gets a flag that determines whether diagnostic messages will be emitted. If the flag is not + set, returns the default value (false). + + + + + Gets a flag that determines whether internal diagnostic messages will be emitted. If the flag is not + set, returns the default value (false). + + + + + Gets a flag that determines the default display name format for test methods. + + + + + Gets a flag that determines the default display name format for test methods. If the flag is not present, + returns the default value (). + + + + + Gets a flag that determines the default display name format options for test methods. + + + + + Gets a flag that determines the default display name format options for test methods. If the flag is not present, + returns the default value (). + + + + + Gets a flag that determines whether theories are pre-enumerated. If they enabled, then the + discovery system will return a test case for each row of test data; they are disabled, then the + discovery system will return a single test case for the theory. + + + + + Gets a flag that determines whether theories are pre-enumerated. If they enabled, then the + discovery system will return a test case for each row of test data; they are disabled, then the + discovery system will return a single test case for the theory. If the flag is not present, + returns the default value (true). + + + + + Gets a flag that determines whether xUnit.net should report test results synchronously. + + + + + Gets a flag that determines whether xUnit.net should report test results synchronously. + If the flag is not set, returns the default value (false). + + + + + Sets a flag that determines whether diagnostic messages will be emitted. + + + + + Sets a flag that determines whether internal diagnostic messages will be emitted. + + + + + Sets a flag that determines the default display name format for test methods. + + + + + Sets the flags that determine the default display options for test methods. + + + + + Sets a flag that determines whether theories are pre-enumerated. If they enabled, then the + discovery system will return a test case for each row of test data; they are disabled, then the + discovery system will return a single test case for the theory. + + + + + Sets a flag that determines whether xUnit.net should report test results synchronously. + + + + + Gets a flag that determines whether diagnostic messages will be emitted. + + + + + Gets a flag that determines whether internal diagnostic messages will be emitted. + + + + + Gets a flag that determines whether diagnostic messages will be emitted. If the flag is not + present, returns the default value (false). + + + + + Gets a flag that determines whether internal diagnostic messages will be emitted. If the flag is not + present, returns the default value (false). + + + + + Gets a flag to disable parallelization. + + + + + Gets a flag to disable parallelization. If the flag is not present, returns the + default value (false). + + + + + Gets the maximum number of threads to use when running tests in parallel. + + + + + Gets the maximum number of threads to use when running tests in parallel. If set to 0 (or not set), + the value of is used; if set to a value less + than 0, does not limit the number of threads. + + + + + Gets a flag that determines whether xUnit.net should report test results synchronously. + + + + + Gets a flag that determines whether xUnit.net should report test results synchronously. + If the flag is not set, returns the default value (false). + + + + + Sets a flag that determines whether diagnostic messages will be emitted. + + + + + Sets a flag that determines whether internal diagnostic messages will be emitted. + + + + + Sets a flag that determines whether xUnit.net stop testing when a test fails. + + + + + Sets a flag to disable parallelization. + + + + + Sets the maximum number of threads to use when running tests in parallel. + If set to 0 (the default value), does not limit the number of threads. + + + + + Sets a flag that determines whether xUnit.net should report test results synchronously. + + + + + Rethrows an exception object without losing the existing stack trace information + + The exception to re-throw. + + For more information on this technique, see + http://www.dotnetjunkies.com/WebLog/chris.taylor/archive/2004/03/03/8353.aspx. + The remote_stack_trace string is here to support Mono. + + + + + Unwraps an exception to remove any wrappers, like . + + The exception to unwrap. + The unwrapped exception. + + + + Guard class, used for guard clauses and argument validation + + + + + + + + + + + + + + + + + Methods which help bridge and contain the differences between Type and TypeInfo. + + + + diff --git a/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.abstractions.dll b/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.abstractions.dll new file mode 100755 index 000000000..d2f74d42c Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.abstractions.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.console.deps.json b/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.console.deps.json new file mode 100755 index 000000000..a4912b55d --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.console.deps.json @@ -0,0 +1,210 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v2.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v2.0": { + "xunit.console/2.4.2": { + "dependencies": { + "Microsoft.SourceLink.GitHub": "1.1.1", + "Nerdbank.GitVersioning": "3.5.108", + "xunit.runner.reporters": "1.0.0" + }, + "runtime": { + "xunit.console.dll": {} + } + }, + "Microsoft.Build.Tasks.Git/1.1.1": {}, + "Microsoft.NETCore.Targets/1.0.1": {}, + "Microsoft.SourceLink.Common/1.1.1": {}, + "Microsoft.SourceLink.GitHub/1.1.1": { + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } + }, + "Nerdbank.GitVersioning/3.5.108": {}, + "System.IO/4.1.0": { + "dependencies": { + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0", + "System.Text.Encoding": "4.0.11", + "System.Threading.Tasks": "4.0.11" + } + }, + "System.Reflection/4.1.0": { + "dependencies": { + "Microsoft.NETCore.Targets": "1.0.1", + "System.IO": "4.1.0", + "System.Reflection.Primitives": "4.0.1", + "System.Runtime": "4.1.0" + } + }, + "System.Reflection.Primitives/4.0.1": { + "dependencies": { + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + } + }, + "System.Runtime/4.1.0": { + "dependencies": { + "Microsoft.NETCore.Targets": "1.0.1" + } + }, + "System.Runtime.Loader/4.0.0": { + "dependencies": { + "System.IO": "4.1.0", + "System.Reflection": "4.1.0", + "System.Runtime": "4.1.0" + } + }, + "System.Text.Encoding/4.0.11": { + "dependencies": { + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + } + }, + "System.Threading.Tasks/4.0.11": { + "dependencies": { + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + } + }, + "xunit.abstractions/2.0.3": { + "runtime": { + "lib/netstandard2.0/xunit.abstractions.dll": { + "assemblyVersion": "2.0.0.0", + "fileVersion": "2.0.0.0" + } + } + }, + "xunit.runner.reporters/1.0.0": { + "dependencies": { + "xunit.runner.utility": "1.0.0" + }, + "runtime": { + "xunit.runner.reporters.netcoreapp10.dll": {} + } + }, + "xunit.runner.utility/1.0.0": { + "dependencies": { + "System.Runtime.Loader": "4.0.0", + "xunit.abstractions": "2.0.3" + }, + "runtime": { + "xunit.runner.utility.netcoreapp10.dll": {} + } + } + } + }, + "libraries": { + "xunit.console/2.4.2": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "Microsoft.Build.Tasks.Git/1.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q==", + "path": "microsoft.build.tasks.git/1.1.1", + "hashPath": "microsoft.build.tasks.git.1.1.1.nupkg.sha512" + }, + "Microsoft.NETCore.Targets/1.0.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-rkn+fKobF/cbWfnnfBOQHKVKIOpxMZBvlSHkqDWgBpwGDcLRduvs3D9OLGeV6GWGvVwNlVi2CBbTjuPmtHvyNw==", + "path": "microsoft.netcore.targets/1.0.1", + "hashPath": "microsoft.netcore.targets.1.0.1.nupkg.sha512" + }, + "Microsoft.SourceLink.Common/1.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==", + "path": "microsoft.sourcelink.common/1.1.1", + "hashPath": "microsoft.sourcelink.common.1.1.1.nupkg.sha512" + }, + "Microsoft.SourceLink.GitHub/1.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==", + "path": "microsoft.sourcelink.github/1.1.1", + "hashPath": "microsoft.sourcelink.github.1.1.1.nupkg.sha512" + }, + "Nerdbank.GitVersioning/3.5.108": { + "type": "package", + "serviceable": true, + "sha512": "sha512-+1Zn/jrrbBS1MVK20W8d8g4nEREPuZ6IHDTmtqlJiNeGXN45Iou0IPe5hykbLAVyWfnoN3bPCDBIVjeAfoMsWQ==", + "path": "nerdbank.gitversioning/3.5.108", + "hashPath": "nerdbank.gitversioning.3.5.108.nupkg.sha512" + }, + "System.IO/4.1.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-3KlTJceQc3gnGIaHZ7UBZO26SHL1SHE4ddrmiwumFnId+CEHP+O8r386tZKaE6zlk5/mF8vifMBzHj9SaXN+mQ==", + "path": "system.io/4.1.0", + "hashPath": "system.io.4.1.0.nupkg.sha512" + }, + "System.Reflection/4.1.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-JCKANJ0TI7kzoQzuwB/OoJANy1Lg338B6+JVacPl4TpUwi3cReg3nMLplMq2uqYfHFQpKIlHAUVAJlImZz/4ng==", + "path": "system.reflection/4.1.0", + "hashPath": "system.reflection.4.1.0.nupkg.sha512" + }, + "System.Reflection.Primitives/4.0.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-4inTox4wTBaDhB7V3mPvp9XlCbeGYWVEM9/fXALd52vNEAVisc1BoVWQPuUuD0Ga//dNbA/WeMy9u9mzLxGTHQ==", + "path": "system.reflection.primitives/4.0.1", + "hashPath": "system.reflection.primitives.4.0.1.nupkg.sha512" + }, + "System.Runtime/4.1.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-v6c/4Yaa9uWsq+JMhnOFewrYkgdNHNG2eMKuNqRn8P733rNXeRCGvV5FkkjBXn2dbVkPXOsO0xjsEeM1q2zC0g==", + "path": "system.runtime/4.1.0", + "hashPath": "system.runtime.4.1.0.nupkg.sha512" + }, + "System.Runtime.Loader/4.0.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-4UN78GOVU/mbDFcXkEWtetJT/sJ0yic2gGk1HSlSpWI0TDf421xnrZTDZnwNBapk1GQeYN7U1lTj/aQB1by6ow==", + "path": "system.runtime.loader/4.0.0", + "hashPath": "system.runtime.loader.4.0.0.nupkg.sha512" + }, + "System.Text.Encoding/4.0.11": { + "type": "package", + "serviceable": true, + "sha512": "sha512-U3gGeMlDZXxCEiY4DwVLSacg+DFWCvoiX+JThA/rvw37Sqrku7sEFeVBBBMBnfB6FeZHsyDx85HlKL19x0HtZA==", + "path": "system.text.encoding/4.0.11", + "hashPath": "system.text.encoding.4.0.11.nupkg.sha512" + }, + "System.Threading.Tasks/4.0.11": { + "type": "package", + "serviceable": true, + "sha512": "sha512-k1S4Gc6IGwtHGT8188RSeGaX86Qw/wnrgNLshJvsdNUOPP9etMmo8S07c+UlOAx4K/xLuN9ivA1bD0LVurtIxQ==", + "path": "system.threading.tasks/4.0.11", + "hashPath": "system.threading.tasks.4.0.11.nupkg.sha512" + }, + "xunit.abstractions/2.0.3": { + "type": "package", + "serviceable": true, + "sha512": "sha512-pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg==", + "path": "xunit.abstractions/2.0.3", + "hashPath": "xunit.abstractions.2.0.3.nupkg.sha512" + }, + "xunit.runner.reporters/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "xunit.runner.utility/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.console.dll b/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.console.dll new file mode 100755 index 000000000..1d42fdfe7 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.console.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.console.dll.config b/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.console.dll.config new file mode 100755 index 000000000..99230ca04 --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.console.dll.config @@ -0,0 +1,7 @@ + + + + + + + diff --git a/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.console.runtimeconfig.json b/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.console.runtimeconfig.json new file mode 100755 index 000000000..19644d0a6 --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.console.runtimeconfig.json @@ -0,0 +1,12 @@ +{ + "runtimeOptions": { + "tfm": "netcoreapp2.0", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "2.0.0" + }, + "configProperties": { + "System.Reflection.Metadata.MetadataUpdater.IsSupported": false + } + } +} \ No newline at end of file diff --git a/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.runner.reporters.netcoreapp10.dll b/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.runner.reporters.netcoreapp10.dll new file mode 100755 index 000000000..3ef003b9e Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.runner.reporters.netcoreapp10.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.runner.utility.netcoreapp10.dll b/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.runner.utility.netcoreapp10.dll new file mode 100755 index 000000000..b7cc59b35 Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.runner.utility.netcoreapp10.dll differ diff --git a/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.runner.utility.netcoreapp10.xml b/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.runner.utility.netcoreapp10.xml new file mode 100755 index 000000000..0bd44361d --- /dev/null +++ b/packages/xunit.runner.console.2.4.2/tools/netcoreapp2.0/xunit.runner.utility.netcoreapp10.xml @@ -0,0 +1,4508 @@ + + + + xunit.runner.utility.netcoreapp10 + + + + + This class is used to read configuration information for a test assembly. + + + + + Loads the test assembly configuration for the given test assembly. + + The test assembly. + The test assembly configuration file. + The test assembly configuration. + + + + Loads the test assembly configuration for the given test assembly from a JSON stream. Caller is responsible for opening the stream. + + Stream containing config for an assembly + The test assembly configuration. + + + + This class is used to read configuration information for a test assembly. + + + + + Loads the test assembly configuration for the given test assembly from a JSON stream. Caller is responsible for opening the stream. + + Stream containing config for an assembly + The test assembly configuration. + + + + Loads the test assembly configuration for the given test assembly. + + The test assembly. + The test assembly configuration file. + The test assembly configuration. + + + + INTERNAL CLASS. DO NOT USE. + + + + + + + + + + + INTERNAL CLASS. DO NOT USE. + + + + + + + + + + + INTERNAL INTERFACE. DO NOT USE. + + + + + + + + INTERNAL INTERFACE. DO NOT USE. + + + + + + + + INTERNAL CLASS. DO NOT USE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Interface implemented by runners, passed to , so that the + report can log lines of text to the output device. + + + + + Gets a lock object that can be used to ensure that multiple calls to + log messages will always be grouped together. + + + + + Logs a normal-priority message with stack frame. + + The stack frame information + The message to be logged + + + + Logs a high-priority message with stack frame. + + The stack frame information + The message to be logged + + + + Logs a warning message with stack frame. + + The stack frame information + The message to be logged + + + + Logs an error message with stack frame. + + The stack frame information + The message to be logged + + + + This interface represents a reporter which is invoked by a test runner + during test execution. The report can be explicitly invoked by a command + line switch or implicitly invoked by being environmentally enabled (for + example, a reporter that emits messages for TeamCity). + + + + + Gets the description of the reporter. This is typically used when showing + the user the invocation option for the reporter. + + + + + Gets a value which indicates whether the reporter should be + environmentally enabled. + + + + + Gets a value which indicates a runner switch which can be used + to explicitly enable the runner. If the return value is null, + then the reported can only be environmentally enabled (implicitly). + This value is used either as a command line switch (with the console or + .NET CLI runner) or as a runner configuration value (with the MSBuild runner). + + + + + Creates a message handler that will report messages for the given + test assembly. Ideally, the handler should also implement + for optimal performance, but plain implementations of are supported + for backward compatibility reasons. + + The logger used to send result messages to + The message handler that handles the messages + + + + A message sent to implementations of when + discovery is finished for a test assembly. + + + + + Gets information about the assembly being discovered. + + + + + Gets the options that were used during discovery. + + + + + Gets the number of test cases that were discovered. This is the raw + number of test cases found before filtering is applied by the runner. + + + + + Gets the number of test cases that will be run. This is the number of + test cases found after filtering is applied by the runner. + + + + + A message sent to implementations of when + discovery is starting for a test assembly. + + + + + Gets a flag which indicates whether the tests will be discovered and run in a + separate app domain. + + + + + Gets information about the assembly being discovered. + + + + + Gets the options that will be used during discovery. + + + + + Gets a flag which indicates whether shadow copies are being used. If app domains are + not enabled, then this value is ignored. + + + + + A message sent to implementations of when + execution is finished for a test assembly. + + + + + Gets information about the assembly being discovered. + + + + + Gets the options that were used during execution. + + + + + Gets the summary of the execution results for the test assembly. + + + + + A message sent to implementations of when + execution is starting for a test assembly. + + + + + Gets information about the assembly being discovered. + + + + + Gets the options that will be used during execution. + + + + + A message sent to implementations of when + execution of all test assemblies has completed. + + + + + Gets the clock time elapsed when running the tests. This may different significantly + from the sum of the times reported in the summaries, if the runner chose to run + the test assemblies in parallel. + + + + + Gets the summaries of all the tests run. The key is the display name of the test + assembly; the value is the summary of test execution for that assembly. + + + + + Indicates the level of app domain support that the runner is requesting. + + + + + Requests that app domains be used, if available; if app domains cannot be used, then + the tests will be discovered and run in the runner's app domain. + + + + + Requires that tests be run in the runner's app domain. This is supported by all runners + and all execution libraries. + + + + + Represents a class which acts as a front controller for unit testing frameworks. + This allows runners to run tests from multiple unit testing frameworks (in particular, + hiding the differences between xUnit.net v1 and v2 tests). + + + + + Gets a flag indicating whether this discovery/execution can use app domains. + + + + + An implementation of that always returns no + source information. Useful for test runners which don't need or cannot provide source + information during discovery. + + + + + + + + + + + Represents the configuration items set in the App.config file of a test assembly. + Should be read with the class. + + + + + Gets or sets a flag indicating whether an app domain should be used to discover and run tests. + + + + + Gets or sets a flag indicating whether an app domain should be used to discover and run tests. + If the flag is not set, returns the default value (). + + + + + Gets or sets a flag indicating that the end user wants diagnostic messages + from the test framework. + + + + + Gets a flag indicating that the end user wants diagnostic messages + from the test framework. If the flag is not set, returns the default + value (false). + + + + + Gets or sets a flag indicating that the end user wants internal diagnostic messages + from the test framework. + + + + + Gets a flag indicating that the end user wants internal diagnostic messages + from the test framework. If the flag is not set, returns the default + value (false). + + + + + Gets the number of seconds that a test can run before being considered "long running". Set to a positive + value to enable the feature. + + + + + Gets the number of seconds that a test can run before being considered "long running". If the value is not + set, returns the default value (-1). + + + + + Gets or sets the maximum number of thread to use when parallelizing this assembly. + + + + + Gets the maximum number of thread to use when parallelizing this assembly. + If the value is not set, returns the default value (). + + + + + Gets or sets the default display name for test methods. + + + + + Gets the default display name for test methods. If the value is not set, returns + the default value (). + + + + + Gets or sets the default display options for test methods. + + + + + Gets the default display options for test methods. If the value is not set, returns + the default value (). + + + + + Gets or sets a flag indicating that this assembly is safe to parallelize against + other assemblies. + + + + + Gets a flag indicating that this assembly is safe to parallelize against + other assemblies. If the flag is not set, returns the default value (false). + + + + + Gets or sets a flag indicating that this test assembly wants to run test collections + in parallel against one another. + + + + + Gets a flag indicating that this test assembly wants to run test collections + in parallel against one another. If the flag is not set, returns the default + value (true). + + + + + Gets or sets a flag indicating whether theory data should be pre-enumerated during + test discovery. + + + + + Gets a flag indicating whether theory data should be pre-enumerated during + test discovery. If the flag is not set, returns the default value (true). + + + + + Gets or sets a flag indicating whether shadow copies should be used. + + + + + Gets a flag indicating whether shadow copies should be used. If the flag is not set, + returns the default value (true). + + + + + Gets or sets a flag indicating whether testing should stop on a failure. + + + + + Gets a flag indicating whether testing should stop on a test failure. If the flag is not set, + returns the default value (false). + + + + + Represents options passed to a test framework for discovery or execution. + + + + + Creates an instance of + + The optional configuration to copy values from. + + + + Creates an instance of + + The optional configuration to copy values from. + + + + Gets a value from the options collection. + + The type of the value. + The name of the value. + Returns the value. + + + + Sets a value into the options collection. + + The type of the value. + The name of the value. + The value. + + + + An implementation of for xUnit.net v1. + + + + + Initializes a new instance of the class. + + The filename of the test assembly. + + + + Gets the filename of the test assembly. + + + + + An implementation of , + and for xUnit.net v1 tests. + + + + + Initializes a new instance of the class. + + The assembly under test. + The type under test. + The method under test. + + + + Gets the name of the assembly under test. + + + + + Gets the name of the method under test. + + + + + Gets the name of the type under test. + + + + + Gets the unique ID for the test. + + + + + Collects statistics from running tests. + + + + + A flag that indicates whether or not to continue running tests. + + + + + The total number of tests run. + + + + + The number of tests that failed. + + + + + The number of tests that were skipped. + + + + + The time spent running the tests. + + + + + Aggregates the current results with the other results. + + The other result. + + + + Resets the counted results back to zero. + + + + + An implementation of for xUnit v1. + + + + + Initializes a new instance of the class. + + The test case this test belongs to. + The display name for this test. + + + + + + + + + + An implementation of that adapts xUnit.net v1's XML-based APIs + into xUnit.net v2's object-based APIs. + + + + + + + + Initializes a new instance of the class. + + The assembly under test. + The configuration file name. + The type under test. + The method under test. + The display name of the unit test. + The traits of the unit test. + The skip reason, if the test is skipped. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This class be used to do discovery and execution of xUnit.net v2 tests + using a reflection-based implementation of . + + + + + Initializes a new instance of the class. + + Determines whether tests should be run in a separate app domain. + The source code information provider. + The test assembly. + The test assembly configuration file. + If set to true, runs tests in a shadow copied app domain, which allows + tests to be discovered and run without locking assembly files on disk. + The path on disk to use for shadow copying; if null, a folder + will be automatically (randomly) generated + The message sink which received messages. + Determines whether or not the existence of the test assembly is verified. + + + + + + + + + + + + + Starts the process of running all the xUnit.net v2 tests in the assembly. + + The message sink to report results back to. + The options to be used during test discovery. + The options to be used during test execution. + + + + Starts the process of running the selected xUnit.net v2 tests. + + The test cases to run; if null, all tests in the assembly are run. + The message sink to report results back to. + The options to be used during test execution. + + + + This class be used to do discovery of xUnit.net v2 tests, via any implementation + of , including AST-based runners like CodeRush and + Resharper. Runner authors who are not using AST-based discovery are strongly + encouraged to use instead. + + + + + Initializes a new instance of the class. + + Determines whether tests should be run in a separate app domain. + The source code information provider. + The assembly to use for discovery + The path on disk of xunit.execution.dll; if null, then + the location of xunit.execution.dll is implied based on the location of the test assembly + The path on disk to use for shadow copying; if null, a folder + will be automatically (randomly) generated + The message sink which received messages. + Determines whether or not to check for the existence of assembly files. + + + + Gets a value indicating whether the tests can use app domains (must be linked against desktop execution library). + + + + + Gets the message sink used to report diagnostic messages. + + + + + Returns the test framework from the remote app domain. + + + + + + + + + + + Creates a high performance cross AppDomain message sink that utilizes + which can be passed to and . + + The local message sink to receive the messages. + + + + + + + Starts the process of finding all xUnit.net v2 tests in an assembly. + + Whether to include source file information, if possible. + The message sink to report results back to. + The options used by the test framework during discovery. + + + + Starts the process of finding all xUnit.net v2 tests in a class. + + The fully qualified type name to find tests in. + Whether to include source file information, if possible. + The message sink to report results back to. + The options used by the test framework during discovery. + + + + + + + + + + An implementation of that will provide source information + when running inside of Visual Studio (via the DiaSession class). + + + + + Initializes a new instance of the class. + + The assembly file name. + + + + + + + + + + Default implementation of which supports running tests from + both xUnit.net v1 and v2. + + + + + This constructor is for unit testing purposes only. + + + + + Initializes a new instance of the class. + + Determines whether tests should be run in a separate app domain. + The test assembly. + The test assembly configuration file. + If set to true, runs tests in a shadow copied app domain, which allows + tests to be discovered and run without locking assembly files on disk. + The path on disk to use for shadow copying; if null, a folder + will be automatically (randomly) generated + The source information provider. If null, uses the default (). + The message sink which received messages. + + + + + + + + + + + + + + + + FOR INTERNAL USE ONLY. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Identifies a message that can return its own type information. + + + + + Gets the interface type full names of the implemented interfaces. + + + + + Represents an endpoint for the reception of test messages. This endpoint can have the list of types + of the message passed in to optimize the performance of message dispatching. + + + + + Reports the presence of a message on the message bus with an optional list of message types. + This method should never throw exceptions. + + The message from the message bus. + The list of message types, or null. + Return true to continue running tests, or false to stop. + + + + Represents information about long running tests from . + + + + + Initializes a new instance of the class. + + Configured notification time + Tests + + + + + + + + + + Adapts an implementation of to provide an implementation + of . + + + + + + + + Returns the implemented interface types, if known. + + The message interfaces to retrieve. + The hash set of interfaces, if known; null, otherwise. + + + + + + + + + + Determines whether the given sink is already an implementation of , + and if not, creates a wrapper to adapt it. + + The sink to test, and potentially adapt. + + + + Adapts an implementation of to provide an implementation + of (albeit one without the typical performance + benefits associated with the latter interface). + + + + + + + + + + + + + + Determines whether the given sink is already an implementation of , + and if not, creates a wrapper to adapt it. + + The sink to test, and potentially adapt. + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + Information about the assembly that is being discovered + The discovery options + The number of test cases discovered + The number of test cases to be run + + + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + Information about the assembly that is being discovered + Indicates whether the tests will be discovered and run in a separate app domain + Indicates whether shadow copying is being used + The discovery options + + + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + Information about the assembly that is being discovered + The execution options + The execution summary + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + Information about the assembly that is being discovered + The execution options + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + Represents a set of filters for an . + + + + + Initializes a new instance of the class. + + + + + Gets the set of trait filters for tests to exclude. + + + + + Gets the set of trait filters for tests to include. + + + + + Gets the set of class filters for test classes to exclude. + + + + + Gets the set of class filters for test classes to include. + + + + + Gets the set of method filters for tests to exclude. + + + + + Gets the set of method filters for tests to include. + + + + + Gets the set of assembly filters for tests to exclude. + + + + + Gets the set of assembly filters for tests to include. + + + + + Filters the given method using the defined filter values. + + The test case to filter. + Returns true if the test case passed the filter; returns false otherwise. + + + + FOR INTERNAL USE ONLY. + + + + + + + + + + + + + + + + + + + + + + + Represents an assembly in an . + + + + + Gets or sets the assembly filename. + + + + + Gets or sets the config filename. + + + + + Gets the configuration values read from the test assembly configuration file. + + + + + Gets or sets a value indicating whether to shadow copy the assembly + when running the tests. + + + + + The default implementation of , used + by runners when there is no other overridden reporter. It returns + an instance of . + + + + + + + + + + + + + + + + + Default implementation of used to report + messages for test runners. + + + + + Initializes a new instance of the class. + + The logger used to report messages + + + + Get the logger used to report messages. + + + + + Escapes text for display purposes. + + The text to be escaped + The escaped text + + + + Gets the display name of a test assembly from a test assembly message. + + The test assembly message + The assembly display name + + + + Gets the display name of a test assembly from a test assembly message. + + The test assembly + The assembly display name + + + + Get the test framework options for the given assembly. If it cannot find them, then it + returns a default set of options. + + The test assembly filename + + + + + Logs an error message to the logger. + + The type of the failure + The failure information + + + + Logs a stack trace to the logger. + + + + + Lots test output to the logger. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Writes the default summary to the given logger. Can be used by other reporters who also wish to write the + standard summary information. + + The logger used to send result messages to. + The execution summary to display. + + + + The default implementation of , used + by runners when there is no other overridden reporter. It returns + an instance of . + + + + + + + + + + + + + + + + + Default implementation of used to report + messages for test runners. + + + + + Initializes a new instance of the class. + + The logger used to report messages + + + + Get the logger used to report messages. + + + + + Escapes text for display purposes. + + The text to be escaped + The escaped text + + + + Gets the display name of a test assembly from a test assembly message. + + The test assembly message + The assembly display name + + + + Gets the display name of a test assembly from a test assembly message. + + The test assembly + The assembly display name + + + + Get the test framework options for the given assembly. If it cannot find them, then it + returns a default set of options. + + The test assembly filename + + + + + Logs an error message to the logger. + + The type of the failure + The failure information + + + + Logs a stack trace to the logger. + + + + + Lots test output to the logger. + + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Called when is raised. + + An object that contains the event data. + + + + Writes the default summary to the given logger. Can be used by other reporters who also wish to write the + standard summary information. + + The logger used to send result messages to. + The execution summary to display. + + + + A class which makes it simpler for casual runner authors to find and run tests and get results. + + + + + Set to get notification of diagnostic messages. + + + + + Set to get notification of when test discovery is complete. + + + + + Set to get notification of error messages (unhandled exceptions outside of tests). + + + + + Set to get notification of when test execution is complete. + + + + + Set to get notification of failed tests. + + + + + Set to get notification of finished tests (regardless of outcome). + + + + + Set to get real-time notification of test output (for xUnit.net v2 tests only). + Note that output is captured and reported back to all the test completion Info>s + in addition to being sent to this Info>. + + + + + Set to get notification of passing tests. + + + + + Set to get notification of skipped tests. + + + + + Set to get notification of when tests start running. + + + + + Gets the current status of the assembly runner + + + + + Set to be able to filter the test cases to decide which ones to run. If this is not set, + then all test cases will be run. + + + + + Call to request that the current run be cancelled. Note that cancellation may not be + instantaneous, and even after cancellation has been acknowledged, you can expect to + receive all the cleanup-related messages. + + + + + + + + Starts running tests from a single type (if provided) or the whole assembly (if not). This call returns + immediately, and status results are dispatched to the Info>s on this class. Callers can check + to find out the current status. + + The (optional) type name of the single test class to run + Set to true to enable diagnostic messages; set to false to disable them. + By default, uses the value from the assembly configuration file. + Set to choose the default display name style for test methods. + By default, uses the value from the assembly configuration file. (This parameter is ignored for xUnit.net v1 tests.) + Set to choose the default display name style options for test methods. + By default, uses the value from the assembly configuration file. (This parameter is ignored for xUnit.net v1 tests.) + Set to true to pre-enumerate individual theory tests; set to false to use + a single test case for the theory. By default, uses the value from the assembly configuration file. (This parameter is ignored + for xUnit.net v1 tests.) + Set to true to run test collections in parallel; set to false to run them sequentially. + By default, uses the value from the assembly configuration file. (This parameter is ignored for xUnit.net v1 tests.) + Set to 0 to use unlimited threads; set to any other positive integer to limit to an exact number + of threads. By default, uses the value from the assembly configuration file. (This parameter is ignored for xUnit.net v1 tests.) + Set to true to enable internal diagnostic messages; set to false to disable them. + By default, uses the value from the assembly configuration file. + + + + Creates an assembly runner that discovers and runs tests without a separate app domain. + + The test assembly. + + + + An enumeration which describes the current state of the system + + + + The system is not discovering or executing tests + + + The system is discovering tests + + + The system is executing tests + + + + Represents a diagnostic message from the xUnit.net system or third party extension. + + + + + + + + The diagnostic message. + + + + + Represents test discovery being completed. + + + + + + + + The number of test cases that were discovered. + + + + + The number of test cases that will be run, after filtering was applied. + + + + + Represents an error that happened outside the scope of a running test. + + + + + + + + The type of error condition that was encountered. + + + + + The exception that caused the test failure. + + + + + The message from the exception that caused the test failure. + + + + + The stack trace from the exception that caused the test failure. + + + + + An enumeration which indicates the type of error message (for ). + + + + An unhandled exception occurred that disrupted the execution engine + + + An unhandled exception happened while cleaning up from the test assembly + + + An unhandled exception happened while cleaning up from the test collection + + + An unhandled exception happened while cleaning up from the test class + + + An unhandled exception happened while cleaning up from the test method + + + An unhandled exception happened while cleaning up from the test case + + + An unhandled exception happened while cleaning up from the test + + + + Represents test assembly execution being finished. + + + + + + + + The total number of tests in the assembly. + + + + + The number of the tests that failed. + + + + + The number of tests that were skipped. + + + + + The total execution time spent running tests. + + + + + Used to report results when no tests are executed. + + + + + Represents information about a test that was executed. + + + + + + + + The number of seconds the test spent executing. + + + + + The output from the test. + + + + + Represents a test that failed. + + + + + + + + The exception that caused the test failure. + + + + + The message from the exception that caused the test failure. + + + + + The stack trace from the exception that caused the test failure. + + + + + Represents a test that finished, regardless of the result. + + + + + + + + A base class which contains information about a test. + + + + + + + + The fully qualified type name of the class that contains the test. + + + + + The name of the method that contains the test. + + + + + The traits associated with the test. + + + + + The display name for the test. + + + + + The display name of the test collection the test belongs to. + + + + + Represents live test output. + + + + + + + + The output from the test. + + + + + Represents a test that passed. + + + + + + + + Represents a test that was skipped. + + + + + + + + Gets the reason that was given for skipping the test. + + + + + Represents a test that is starting. + + + + + + + + An implementation of which dispatches messages + to one or more individual message sinks. + + + + + The list of event dispatchers that are registered with the system. + + + + + + + + Gets a dispatcher, optionally creating and registering it if it doesn't exist. + + The type of the dispatcher + The dispatcher + The dispatcher + + + + Reports the presence of a message on the message bus with an optional list of message types. + This method should never throw exceptions. + + The message from the message bus. + The list of message types, or null. + Return true to continue running tests, or false to stop. + + + + A delegating implementation of which provides the execution + summary and finished events when appropriate and cancellation support. + + + + + Initializes a new instance of the class. + + The inner sink to pass messages to. + + + + + + + + + + + + + + + + + + A delegating implementation of which converts all + skipped tests into failures before passing them on to the inner sink. + + + + + Initializes a new instance of the class. + + The sink to delegate messages to. + + + + + + + + + + + + + + + + A delegating implementation of which detects and reports when + tests have become long-running (during otherwise idle time). + + + + + Initializes a new instance of the class, with + long running test messages being delivered as instances to the + provided diagnostic message sink. + + The inner sink to delegate to. + The minimum amount of time a test runs to be considered long running. + The message sink to send messages to. + + + + Initializes a new instance of the class, with + long running test messages being delivered as to the + provided callback. + + The inner sink to delegate to. + The minimum amount of time a test runs to be considered long running. + The callback to dispatch messages to. + + + + + + + + + + Returns the current time in UTC. Overrideable for testing purposes. + + + + + + + + + + + Performs a Task-safe delay. Overrideable for testing purposes. + + + + + A delegating implementation of which is responsible for + creating the xUnit.net v2 XML output from the execution test results. This class is + not available in .NET 3.5 because it relies upon XML LINQ. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + + + Escapes a string for placing into the XML. + + The value to be escaped. + The escaped value. + + + + Class that maps diagnostic messages to events. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + + + + + + + Class that maps test framework discovery messages to events. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + + + + + + + Class that maps test framework execution messages to events. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + Occurs when a message is received. + + + + + + + + + + + Represents a handler for a specific . + + The type of the message to be handled. + The message. + + + + Allows cancellation during message handling. + + + + + Gets a value to indicate whether stop has been requested. + + + + + Call to indicate that execution should stop. + + + + + Wraps a specific with the ability to cancel execution. + + The type of the message to be handled. + + + + Initializes a new instance of the class. + + The message to be handled. + + + + Gets the message. + + + + + Class that maps test runner messages to events. + + + + + Occurs when the runner is starting discovery for a given test assembly. + + + + + Occurs when the runner has finished discovery for a given test assembly. + + + + + Occurs when the runner has finished executing the given test assembly. + + + + + Occurs when the runner is starting to execution the given test assembly. + + + + + Occurs when the runner has finished executing all test assemblies. + + + + + + + + + + + Represents an that can also provide execution + information like an . + + + + + Gets the final execution summary, once the execution is finished. + + + + + Gets an event which is signaled once execution is finished. + + + + + An implementation of designed for test discovery for a + single test assembly. The event is triggered when discovery is complete. + + + + + Initializes a new instance of the class. + + An optional thunk which can be used to control cancellation. + + + + The list of discovered test cases. + + + + + Gets an event which is signaled once discovery is finished. + + + + + + + + + + + An implementation of that provides access to events for all + levels of reporting. + + + + + Gets a list of diagnostics events that can be subscribed to. + + + + + Gets a list of discovery events that can be subscribed to. + + + + + Gets a list of execution events that can be subscribed to. + + + + + Gets a list of runner events that can be subscribed to. + + + + + + + + An implementation of which logs messages + to and . + + + + + Initializes a new instance of the class. + + A flag to indicate whether colors should be used when + logging messages. + + + + Initializes a new instance of the class. + + A flag to indicate whether colors should be used when + logging messages. + The lock object used to prevent console clashes. + + + + + + + + + + + + + + + + + + + Collects execution totals for a group of test cases. + + + + + Gets or set the total number of tests run. + + + + + Gets or sets the number of failed tests. + + + + + Gets or sets the number of skipped tests. + + + + + Gets or sets the total execution time for the tests. + + + + + Gets or sets the total errors (i.e., cleanup failures) for the tests. + + + + + Internal helper class for remoting. + + + + + Unregisters any remoting channels. + + + If there are any registered remoting channels, then MarshalByRefObjects + don't work. Based on bug #9749, it's clear that MSTest (at least through + Visual Studio 2010) registers remoting channels when it runs but doesn't + clean them up when it's done. Right now, the only way to reliably surface + this issue is through MSBuild (as per the bug repro), so for the moment + this work-around code is limited to the MSBuild runner. + + + + + Represents the top of a stack frame, typically taken from an exception or failure information. + + + + + Initializes a new instance of the class. + + + + + + + Gets the filename of the stack frame. May be null if the stack frame is not known. + + + + + Returns true if this is an empty stack frame (e.g., ). + + + + + Gets the line number of the stack frame. May be 0 if the stack frame is not known. + + + + + Get a default (unknown) stack frame info. + + + + + Creates a stack frame info from failure information. + + The failure information to inspect + The stack frame info + + + + Creates a tack frame from source information. This can be useful when simulating a + stack frame in a non-exceptional situation (f.e., for a skipped test). + + The source information to inspect + The stack frame info + + + + Transforms stack frames and stack traces into compiler-like output + so they can be double-clicked in Visual Studio. + + + + + Transforms an individual stack frame. + + The stack frame to transform + The default directory used for computing relative paths + The transformed stack frame + + + + Transforms a stack. + + The stack to transform + The default directory used for computing relative paths + The transformed stack + + + + An implementation of which converts all skipped + tests into failures, wrapping an existing + implementation. + + + + + Initializes a new instance of . + + The visitor to pass messages onto. + + + + + + + + + + Represents an implementation of that is specifically used + during test execution. Provides access to the final execution summary, as well as + an event which is triggered when execution is finished. + + + + + Gets the final execution summary, once the execution is finished. + + + + + Gets an event which is signaled once execution is finished. + + + + + + + + + + + + + + + + + An implementation of that provides several Visit methods that + can provide access to specific message types without the burden of casting. + + + + + Dispatches the message to the given callback, if it's of the correct type. + + The message type + The message + The callback + The result of the callback, if called; true, otherwise + + + + Dispatches the message to the given callback, if it's of the correct type. + The callback is provided with both the message and this instance of the visitor. + + The message type + The message + The callback + The result of the callback, if called; true, otherwise + + + + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue discovering/executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue discovering tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue discovering tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + Called when an instance of is sent to the message sink. + + The message. + Return true to continue executing tests; false otherwise. + + + + An implementation of that provides several Visit methods that + can provide access to specific message types without the burden of casting. It also records + when it sees a completion message, and sets the event appropriately. + + The type of the completion message. + + + + Initializes a new instance of the class. + + + + + This event is triggered when the completion message has been seen. + + + + + + + + + + + An implementation of which records the + execution summary for an assembly, as well as performing the XML aggregation + duties of . + + + + + Initializes a new instance of . + + The inner message sink to pass messages to. + The dictionary which collects execution summaries for all assemblies. + The root XML assembly element to collect the result XML. + The callback used to determine when to cancel execution. + + + + + + + + + + + + + An implementation of which records all operations into + xUnit.net v2 XML format. + + + + + Initializes a new instance of . + + The root XML assembly element to collect the result XML. + The callback used to determine when to cancel execution. + + + + Gets the callback used to determine when to cancel execution. + + + + + Gets or sets the number of errors that have occurred (outside of actual test execution). + + + + + Gets or sets the number of tests which failed. + + + + + Gets or sets the number of tests which were skipped. + + + + + Gets or sets the time spent executing tests, in seconds. + + + + + Gets or sets the total number of tests, regardless of result. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Escapes a string for placing into the XML. + + The value to be escaped. + The escaped value. + + + + Utility classes for dealing with Exception objects. + + + + + Combines multiple levels of messages into a single message. + + The failure information from which to get the messages. + The combined string. + + + + Combines multiple levels of stack traces into a single stack trace. + + The failure information from which to get the stack traces. + The combined string. + + + + Unwraps exceptions and their inner exceptions. + + The exception to be converted. + The failure information. + + + + Base class for all long-lived objects that may cross over an AppDomain. + + + + + Disconnects all remote objects. + + + + + Serializes and de-serializes objects + + + + + De-serializes an object. + + The type of the object + The object's serialized value + The de-serialized object + + + + Serializes an object. + + The value to serialize + The serialized value + + + Gets whether the specified is serializable with . + The object to test for serializability. + true if the object can be serialized; otherwise, false. + + + + Converts an assembly qualified type name into a object. + + The assembly qualified type name. + The instance of the , if available; null, otherwise. + + + + Converts an assembly name + type name into a object. + + The assembly name. + The type name. + The instance of the , if available; null, otherwise. + + + + Gets an assembly qualified type name for serialization, with special dispensation for types which + originate in the execution assembly. + + + + + Retrieves a substring from the string, with whitespace trimmed on both ends. + + The string. + The starting index. + The length. + + A substring starting no earlier than startIndex and ending no later + than startIndex + length. + + + + + An implementation of and that + ignores all messages. + + + + + + + + + + + + + + Default implementation of . + + + + + + + + + + + + + + + + + Indicates the default display name format for test methods. + + + + + Use a fully qualified name (namespace + class + method) + + + + + Use just the method name (without class) + + + + + Indicates the method display options for test methods. + + + + + Indicates no additional method display options. + + This is the default configuration option. + + + + Replace underscores in display names with a space. + + + + + Replace well-known monikers with their equivalent operator. + + + lt : < + le : <= + eq : = + ne : != + gt : > + ge : >= + + + + + Replace supported escape sequences with their equivalent character. + + + Encoding + Format + + ASCIIX hex-digit hex-digit (ex: X2C) + UnicodeU hex-digit hex-digit hex-digit hex-digit (ex: U00A9) + + + + + + Replaces the period delimiter used in namespace and type references with a comma. + + This option is only honored if the setting is also enabled. + + + + Enables all method display options. + + + + + A mirror class of the CLR's class. + + + + + Initializes a new instance of the class. + + The data to copy into the serialization info + + + + + + + + + + + + + Returns BASE64 encoded string that represents the entirety of the data. + + + + + Returns a triple for a key/value pair of data in a complex object + + The triple to be serialized + The serialized version of the triple + + + + Returns the triple values out of a serialized triple. + + The serialized triple + The de-serialized triple + + + + De-serializes a value that was serialized with . + + The type of the object to de-serialize into + The serialized value + The de-serialized object + + + + Serializes an object. + + The value to be serialized + The serialized object + + + + Represents a triple of information used when serializing complex types: the property name, + the value to be serialized, and the value's type. + + + + + Gets the triple's key + + + + + Gets the triple's value + + + + + Gets the triple's value type + + + + + Initializes a new instance of the class. + + The triple's key + The triple's value + The triple's value type + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message to send + + + + Initializes a new instance of the class. + + The format of the message to send + The arguments used to format the message + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of and . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message to send + + + + Initializes a new instance of the class. + + The format of the message to send + The arguments used to format the message + + + + + + + + + + Default implementation of . + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + + + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + + + + Default implementation of . + + + + + Initializes a new instance of the class. + + + + + Extensions methods for . + + + + + Logs a normal-priority message. + + The logger + The message to be logged + + + + Logs a normal-priority formatted message. + + The logger + The format of the message to be logged + The format arguments + + + + Logs a normal-priority formatted message with stack frame. + + The logger + The stack frame information + The format of the message to be logged + The format arguments + + + + Logs a high-priority message. + + The logger + The message to be logged + + + + Logs a high-priority formatted message. + + The logger + The format of the message to be logged + The format arguments + + + + Logs a high-priority formatted message with stack frame. + + The logger + The stack frame information + The format of the message to be logged + The format arguments + + + + Logs a warning message. + + The logger + The message to be logged + + + + Logs a formatted warning message. + + The logger + The format of the message to be logged + The format arguments + + + + Logs a formatted warning message with stack frame. + + The logger + The stack frame information + The format of the message to be logged + The format arguments + + + + Logs an error message. + + The logger + The message to be logged + + + + Logs a formatted error message. + + The logger + The format of the message to be logged + The format arguments + + + + Logs a formatted error message with stack frame. + + The logger + The stack frame information + The format of the message to be logged + The format arguments + + + + Extension methods for . + + + + + Attempts to optimally cast a message to the given message type, using the optional hash of + interface types to improve casting performance. + + The desired destination message type. + The message to test and cast. + The implemented interfaces, if known. + The message as , or null. + + + + Handles a message of a specific type by testing it for the type, as well as verifying that there + is a registered callback; + + The message to dispatch. + The implemented interfaces, if known. + The callback to dispatch the message to. + Returns true if processing should continue; false otherwise. + + + + Extension methods for . + + + + + Provides a simulation of for , + to make it easier to directly dispatch messages from the runner. + + The message sink + The message to be dispatched + The result of calling the message sink + + + + Extension methods for and . + + + + + Starts the process of finding all tests in an assembly. + + The discoverer. + Whether to include source file information, if possible. + The message sink to report results back to. + The options used by the test framework during discovery. + + + + Starts the process of finding all tests in a class. + + The discoverer. + The fully qualified type name to find tests in. + Whether to include source file information, if possible. + The message sink to report results back to. + The options used by the test framework during discovery. + + + + Starts the process of running all the tests in the assembly. + + The executor. + The message sink to report results back to. + The options to be used during test discovery. + The options to be used during test execution. + + + + Starts the process of running selected tests in the assembly. + + The executor. + The test cases to run. + The message sink to report results back to. + The options to be used during test execution. + + + + Extension methods for reading and writing and . + + + + + Gets a flag that determines whether diagnostic messages will be emitted. + + + + + Gets a flag that determines whether internal diagnostic messages will be emitted. + + + + + Gets a flag that determines whether diagnostic messages will be emitted. If the flag is not + set, returns the default value (false). + + + + + Gets a flag that determines whether internal diagnostic messages will be emitted. If the flag is not + set, returns the default value (false). + + + + + Gets a flag that determines the default display name format for test methods. + + + + + Gets a flag that determines the default display name format for test methods. If the flag is not present, + returns the default value (). + + + + + Gets a flag that determines the default display name format options for test methods. + + + + + Gets a flag that determines the default display name format options for test methods. If the flag is not present, + returns the default value (). + + + + + Gets a flag that determines whether theories are pre-enumerated. If they enabled, then the + discovery system will return a test case for each row of test data; they are disabled, then the + discovery system will return a single test case for the theory. + + + + + Gets a flag that determines whether theories are pre-enumerated. If they enabled, then the + discovery system will return a test case for each row of test data; they are disabled, then the + discovery system will return a single test case for the theory. If the flag is not present, + returns the default value (true). + + + + + Gets a flag that determines whether xUnit.net should report test results synchronously. + + + + + Gets a flag that determines whether xUnit.net should report test results synchronously. + If the flag is not set, returns the default value (false). + + + + + Sets a flag that determines whether diagnostic messages will be emitted. + + + + + Sets a flag that determines whether internal diagnostic messages will be emitted. + + + + + Sets a flag that determines the default display name format for test methods. + + + + + Sets the flags that determine the default display options for test methods. + + + + + Sets a flag that determines whether theories are pre-enumerated. If they enabled, then the + discovery system will return a test case for each row of test data; they are disabled, then the + discovery system will return a single test case for the theory. + + + + + Sets a flag that determines whether xUnit.net should report test results synchronously. + + + + + Gets a flag that determines whether diagnostic messages will be emitted. + + + + + Gets a flag that determines whether internal diagnostic messages will be emitted. + + + + + Gets a flag that determines whether diagnostic messages will be emitted. If the flag is not + present, returns the default value (false). + + + + + Gets a flag that determines whether internal diagnostic messages will be emitted. If the flag is not + present, returns the default value (false). + + + + + Gets a flag to disable parallelization. + + + + + Gets a flag to disable parallelization. If the flag is not present, returns the + default value (false). + + + + + Gets the maximum number of threads to use when running tests in parallel. + + + + + Gets the maximum number of threads to use when running tests in parallel. If set to 0 (or not set), + the value of is used; if set to a value less + than 0, does not limit the number of threads. + + + + + Gets a flag that determines whether xUnit.net should report test results synchronously. + + + + + Gets a flag that determines whether xUnit.net should report test results synchronously. + If the flag is not set, returns the default value (false). + + + + + Sets a flag that determines whether diagnostic messages will be emitted. + + + + + Sets a flag that determines whether internal diagnostic messages will be emitted. + + + + + Sets a flag that determines whether xUnit.net stop testing when a test fails. + + + + + Sets a flag to disable parallelization. + + + + + Sets the maximum number of threads to use when running tests in parallel. + If set to 0 (the default value), does not limit the number of threads. + + + + + Sets a flag that determines whether xUnit.net should report test results synchronously. + + + + + Rethrows an exception object without losing the existing stack trace information + + The exception to re-throw. + + For more information on this technique, see + http://www.dotnetjunkies.com/WebLog/chris.taylor/archive/2004/03/03/8353.aspx. + The remote_stack_trace string is here to support Mono. + + + + + Unwraps an exception to remove any wrappers, like . + + The exception to unwrap. + The unwrapped exception. + + + + Guard class, used for guard clauses and argument validation + + + + + + + + + + + + + + + + + Methods which help bridge and contain the differences between Type and TypeInfo. + + + + diff --git a/packages/xunit.runner.console.2.4.2/xunit.runner.console.2.4.2.nupkg b/packages/xunit.runner.console.2.4.2/xunit.runner.console.2.4.2.nupkg new file mode 100755 index 000000000..790d523ca Binary files /dev/null and b/packages/xunit.runner.console.2.4.2/xunit.runner.console.2.4.2.nupkg differ