2009-07-11 Michael Barker <mike@middlesoft.co.uk>
[mono.git] / mcs / class / System.Web.DynamicData / Test / Common / AFieldTemplate.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Web;
6 using System.Web.UI;
7
8 namespace MonoTests.Common
9 {
10         class AFieldTemplate : ITemplate
11         {
12                 public List <Control> Controls { get; private set; }
13
14                 public AFieldTemplate ()
15                 {
16                         Controls = new List<Control> ();
17                 }
18
19                 public void InstantiateIn (Control container)
20                 {
21                         if (container == null)
22                                 return;
23
24                         List <Control> controls = Controls;
25                         if (controls.Count == 0)
26                                 return;
27
28                         foreach (Control c in controls)
29                                 container.Controls.Add (c);
30                 }
31         }
32 }