Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / class / System.Web.DynamicData / Test / Common / TestDataContainer.cs
1 using System;
2 using System.Collections;
3 using System.Collections.Generic;
4 using System.Text;
5 using System.Web.UI;
6 using System.Web.UI.WebControls;
7
8 using MonoTests.DataSource;
9 using MonoTests.ModelProviders;
10
11 namespace MonoTests.Common
12 {
13         public class TestDataContainer <TContext>: DynamicDataContainer<TContext> where TContext: ITestDataContext
14         {
15                 public TestDataContainer ()
16                 { }
17
18                 public TestDataContainer (string tableName)
19                 : base (tableName)
20                 { }
21
22                 public override int Update (IDictionary keys, IDictionary values, IDictionary oldValues)
23                 {
24                         throw new NotImplementedException ();
25                 }
26
27                 public override int Insert (IDictionary values)
28                 {
29                         throw new NotImplementedException ();
30                 }
31
32                 public override int Delete (IDictionary keys, IDictionary oldValues)
33                 {
34                         throw new NotImplementedException ();
35                 }
36
37                 public override IEnumerable Select (DataSourceSelectArguments args, string where, ParameterCollection whereParams)
38                 {
39                         TContext contextInstance = ContainedTypeInstance;
40                         return ContainedTypeInstance.GetTableData (TableName, args, where, whereParams);
41                 }
42
43                 public override List<DynamicDataTable> GetTables ()
44                 {
45                         var data = Activator.CreateInstance<TContext> ();
46                         return data.GetTables ();
47                 }
48         }
49 }