Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / gtest-exmethod-46.cs
1 using System;
2 using System.Collections.Generic;
3
4 namespace ExtensionTest.Two
5 {
6         public delegate TResult AxFunc<in T1, out TResult> (T1 first);
7
8         public static class Extensions
9         {
10                 public static bool Contains<T> (this IEnumerable<T> source, T item)
11                 {
12                         return true;
13                 }
14
15                 public static bool All<T> (this IEnumerable<T> source, AxFunc<T, bool> predicate)
16                 {
17                         return true;
18                 }
19
20         }
21 }
22
23 namespace ExtensionTest
24 {
25         using ExtensionTest.Two;
26
27         public static class MyClass
28         {
29                 public static bool IsCharacters (this string text, params char[] chars)
30                 {
31                         return text.All (chars.Contains);
32                 }
33
34                 public static bool Contains (this string text, string value, StringComparison comp)
35                 {
36                         return text.IndexOf (value, comp) >= 0;
37                 }
38
39                 public static void Main ()
40                 {
41                 }
42         }
43 }