Fixing an issue with output parameters that are of type IntPtr
[castle.git] / MonoRail / TestSiteBrail / Controllers / UsingComponent2Controller.cs
blob657f34c194054125cd66e6f7395cca754cdddb73
1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle.MonoRail.Views.Brail.TestSite.Controllers
17 using System;
18 using System.Collections;
20 using Castle.MonoRail.Framework;
22 public class UsingComponent2Controller : SmartDispatcherController
24 public void ComponentWithInvalidSections()
28 public void GridComponent1()
30 FillPropertyBag();
33 public void GridComponent2()
35 PropertyBag.Add("contacts", new ArrayList());
38 private void FillPropertyBag()
40 ArrayList items = new ArrayList();
42 items.Add(new Contact("hammett", "111"));
43 items.Add(new Contact("Peter Griffin", "222"));
45 PropertyBag.Add("contacts", items);
49 public class Contact
51 string email;
52 string phone;
54 public string Email
56 get { return email; }
57 set { email = value; }
60 public string Phone
62 get { return phone; }
63 set { phone = value; }
66 public Contact(string email, string phone)
68 this.email = email;
69 this.phone = phone;