Merge pull request #4816 from BrzVlad/fix-remoting-exception
[mono.git] / mcs / tests / gtest-linq-14.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq.Expressions;
4
5 public enum Style : ulong {
6         Foo,
7         Bar,
8 }
9
10 public class Person {
11         public Style Style { get; set; }
12 }
13
14 public interface IObjectContainer {}
15
16 public static class Extensions {
17
18         public static IMarker<T> Cast<T> (this IObjectContainer container)
19         {
20                 return null;
21         }
22
23         public static IMarker<T> Where<T> (this IMarker<T> marker, Expression<Func<T, bool>> selector)
24         {
25                 return null;
26         }
27 }
28
29 public interface IMarker<T> : IEnumerable<T> {}
30
31 public class Program {
32
33         public static void Main ()
34         {
35         }
36         
37         public static void Assert (Action a)
38         {
39         }
40
41         public static void Test (IObjectContainer o, Style s)
42         {
43                 Assert (delegate {
44                         var res = from Person p in o
45                         where 0 == s
46                         select p;
47                 });
48         }
49 }