2010-05-31 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / gtest-anon-27.cs
blob7b52b897f724ec26e309f9d5af9fc6c625aa0c39
1 using System;
2 using System.Collections.Generic;
4 public abstract class BaseDataObjectFactory
6 protected static T GetBusinessQueryObjectFromReader<T> ()
7 where T : BusinessQueryObject, new ()
9 T t = new T ();
10 return t;
13 public abstract T [] GetQueryObjects<T> (string query)
14 where T : BusinessQueryObject, new ();
17 public class BusinessQueryObject
21 public class MySqlDataObjectFactory : BaseDataObjectFactory
23 public override T [] GetQueryObjects<T> (string query)
25 List<T> list = new List<T> ();
26 list.Add (GetBusinessQueryObjectFromReader<T> ());
27 ExecuteReader(5,
28 delegate() {
29 list.Add(GetBusinessQueryObjectFromReader<T>());
30 });
31 return list.ToArray ();
34 static void ExecuteReader (int a, PerformActionWithReader action)
38 delegate void PerformActionWithReader ();
41 public class C
43 public static void Main ()