Permalink
Browse files

missing FW2 stuff

  • Loading branch information...
adrianaisemberg committed Oct 27, 2011
1 parent 8988234 commit ac2b522225a5e0721842232e09b6df7f458aefec
Showing with 1,293 additions and 1,251 deletions.
  1. +1 −0 CLAP/CLAP.csproj
  2. +25 −0 CLAP/FW2Stuff.cs
  3. +3 −1,251 CLAP/Parser.cs
  4. +1,264 −0 CLAP/ParserBase.cs
View
@@ -93,6 +93,7 @@
<Compile Include="ParametersExpressionValidator.cs" />
<Compile Include="Parser.cs" />
<Compile Include="IValidation.cs" />
+ <Compile Include="ParserBase.cs" />
<Compile Include="ParserRegistration.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Serialization.cs" />
View
@@ -106,6 +106,19 @@ public static bool Any<T>(this IEnumerable<T> collection, Func<T, bool> predicat
return false;
}
+ public static bool All<T>(this IEnumerable<T> collection, Func<T, bool> predicate)
+ {
+ foreach (var item in collection)
+ {
+ if (!predicate(item))
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
public static int Count<T>(this IEnumerable<T> collection)
{
var c = 0;
@@ -231,6 +244,18 @@ public static bool Contains<TSource>(this IEnumerable<TSource> source, TSource v
return false;
}
+
+ public static List<T> ToList<T>(this IEnumerable<T> collection)
+ {
+ var list = new List<T>();
+
+ foreach (var item in collection)
+ {
+ list.Add(item);
+ }
+
+ return list;
+ }
}
#endregion Enumerable
Oops, something went wrong.

0 comments on commit ac2b522

Please sign in to comment.