From: <bo...@us...> - 2013-05-01 03:55:03
|
Revision: 537 http://sourceforge.net/p/xmlunit/code/537 Author: bodewig Date: 2013-05-01 03:55:01 +0000 (Wed, 01 May 2013) Log Message: ----------- .NET 2.0 compatibility Modified Paths: -------------- trunk/xmlunit/src/main/net-constraints/ValidationConstraints.cs trunk/xmlunit/src/main/net-core/util/Linqy.cs Modified: trunk/xmlunit/src/main/net-constraints/ValidationConstraints.cs =================================================================== --- trunk/xmlunit/src/main/net-constraints/ValidationConstraints.cs 2013-04-27 15:08:57 UTC (rev 536) +++ trunk/xmlunit/src/main/net-constraints/ValidationConstraints.cs 2013-05-01 03:55:01 UTC (rev 537) @@ -57,8 +57,10 @@ } private string GrabSystemIds() { - return string.Join("\n", Linqy.Map<ISource, - string>(validator.SchemaSources, GrabSystemId)); + return string.Join("\n", Linqy.ToArray(Linqy.Map<ISource, + string>(validator + .SchemaSources, + GrabSystemId))); } private string GrabActual() { @@ -72,8 +74,9 @@ } private string GrabProblems() { - return string.Join(", ", Linqy.Map<ValidationProblem, - string>(result.Problems, ProblemToString)); + return string.Join(", ", Linqy.ToArray(Linqy.Map<ValidationProblem, + string>(result.Problems, + ProblemToString))); } private string ProblemToString(ValidationProblem problem) { Modified: trunk/xmlunit/src/main/net-core/util/Linqy.cs =================================================================== --- trunk/xmlunit/src/main/net-core/util/Linqy.cs 2013-04-27 15:08:57 UTC (rev 536) +++ trunk/xmlunit/src/main/net-core/util/Linqy.cs 2013-05-01 03:55:01 UTC (rev 537) @@ -76,5 +76,12 @@ } return c; } + + /// <summary> + /// Collects the elements of a sequence into an array. + /// </summary> + public static T[] ToArray<T>(IEnumerable<T> e) { + return new List<T>(e).ToArray(); + } } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |