* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / class / System.Web / Test / mainsoft / MainsoftWebApp / System_Web / HttpApplicationState / HttpApplicationState_Item_S.aspx.cs
1 //
2 // Authors:
3 //   Rafael Mizrahi   <rafim@mainsoft.com>
4 //   Erez Lotan       <erezl@mainsoft.com>
5 //   Vladimir Krasnov <vladimirk@mainsoft.com>
6 //
7 //
8 // Copyright (c) 2002-2005 Mainsoft Corporation.
9 //
10 // Permission is hereby granted, free of charge, to any person obtaining
11 // a copy of this software and associated documentation files (the
12 // "Software"), to deal in the Software without restriction, including
13 // without limitation the rights to use, copy, modify, merge, publish,
14 // distribute, sublicense, and/or sell copies of the Software, and to
15 // permit persons to whom the Software is furnished to do so, subject to
16 // the following conditions:
17 //
18 // The above copyright notice and this permission notice shall be
19 // included in all copies or substantial portions of the Software.
20 //
21 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 //
29
30 using System;
31 using System.Web;
32 using System.Web.UI;
33 using System.Web.UI.WebControls;
34 using System.Web.UI.HtmlControls;
35 using System.Collections;
36
37 namespace GHTTests.System_Web_dll.System_Web
38 {public class HttpApplicationState_Item_S
39     : GHTBaseWeb {
40          #region Web Form Designer generated code
41          override protected void OnInit(EventArgs e) {
42                  //
43                  // CODEGEN: This call is required by the ASP.NET Web Form Designer.
44                  //
45                  InitializeComponent();
46                  base.OnInit(e);
47          }
48                 
49          /// <summary>
50          /// Required method for Designer support - do not modify
51          /// the contents of this method with the code editor.
52          /// </summary>
53          private void InitializeComponent() {    
54                  this.Load += new System.EventHandler(this.Page_Load);
55          }
56          #endregion
57
58          private void Page_Load(object sender, EventArgs e)
59          {
60                  HtmlForm form1 = (HtmlForm) (HtmlForm)this.FindControl("Form1");
61                  this.GHTTestBegin(form1);
62                  this.GHTSubTestBegin("GHTSubTest1");
63                  try
64                  {
65                          IEnumerator enumerator4 = null;
66                          this.Application.Clear();
67                          this.Application["var1"] = "variable1";
68                          this.Application["var2"] = "variable2";
69                          this.Application["var3"] = "variable3";
70                          try
71                          {
72                                  enumerator4 = this.Application.GetEnumerator();
73                                  while (enumerator4.MoveNext())
74                                  {
75                                          string text1 = (string)(enumerator4.Current);
76                                          if (this.Application[text1] == null)
77                                          {
78                                                  this.GHTSubTestAddResult(("Application(\"" + text1) + "\") = null");
79                                                  continue;
80                                          }
81                                          this.GHTSubTestAddResult((string)(("Application(\"" + text1) + "\") = " + this.Application[text1]));
82                                  }
83                          }
84                          finally
85                          {
86                                  if (enumerator4 is IDisposable)
87                                  {
88                                          ((IDisposable) enumerator4).Dispose();
89                                  }
90                          }
91                  }
92                  catch (Exception exception5)
93                  {
94                          // ProjectData.SetProjectError(exception5);
95                          Exception exception1 = exception5;
96                          this.GHTSubTestUnexpectedExceptionCaught(exception1);
97                          // ProjectData.ClearProjectError();
98                  }
99                  this.GHTSubTestEnd();
100                  this.GHTSubTestBegin("GHTSubTest2");
101                  try
102                  {
103                          IEnumerator enumerator3 = null;
104                          this.Application["var1"] = "variable1";
105                          this.Application["var2"] = "variable2";
106                          this.Application["var3"] = "variable3";
107                          try
108                          {
109                                  enumerator3 = this.Application.GetEnumerator();
110                                  while (enumerator3.MoveNext())
111                                  {
112                                          string text2 = (string)(enumerator3.Current);
113                                          if (this.Application[text2] == null)
114                                          {
115                                                  this.GHTSubTestAddResult(("Application(\"" + text2) + "\") = null");
116                                                  continue;
117                                          }
118                                          this.GHTSubTestAddResult((string)(("Application(\"" + text2) + "\") = " + this.Application[text2]));
119                                  }
120                          }
121                          finally
122                          {
123                                  if (enumerator3 is IDisposable)
124                                  {
125                                          ((IDisposable) enumerator3).Dispose();
126                                  }
127                          }
128                  }
129                  catch (Exception exception6)
130                  {
131                          // ProjectData.SetProjectError(exception6);
132                          Exception exception2 = exception6;
133                          this.GHTSubTestUnexpectedExceptionCaught(exception2);
134                          // ProjectData.ClearProjectError();
135                  }
136                  this.GHTSubTestEnd();
137                  this.GHTSubTestBegin("GHTSubTest3");
138                  try
139                  {
140                          IEnumerator enumerator2 = null;
141                          this.Application[""] = "";
142                          this.Application["Nothing"] = null;
143                          try
144                          {
145                                  enumerator2 = this.Application.GetEnumerator();
146                                  while (enumerator2.MoveNext())
147                                  {
148                                          string text3 = (string)(enumerator2.Current);
149                                          if (this.Application[text3] == null)
150                                          {
151                                                  this.GHTSubTestAddResult(("Application(\"" + text3) + "\") = null");
152                                                  continue;
153                                          }
154                                          this.GHTSubTestAddResult((string)(("Application(\"" + text3) + "\") = " + this.Application[text3]));
155                                  }
156                          }
157                          finally
158                          {
159                                  if (enumerator2 is IDisposable)
160                                  {
161                                          ((IDisposable) enumerator2).Dispose();
162                                  }
163                          }
164                  }
165                  catch (Exception exception7)
166                  {
167                          // ProjectData.SetProjectError(exception7);
168                          Exception exception3 = exception7;
169                          this.GHTSubTestUnexpectedExceptionCaught(exception3);
170                          // ProjectData.ClearProjectError();
171                  }
172                  this.GHTSubTestEnd();
173                  this.GHTSubTestBegin("GHTSubTest4");
174                  try
175                  {
176                          IEnumerator enumerator1 = null;
177                          try
178                          {
179                                  enumerator1 = this.Application.GetEnumerator();
180                                  while (enumerator1.MoveNext())
181                                  {
182                                          string text4 = (string)(enumerator1.Current);
183                                          if (this.Application[text4 + "_" + text4] == null)
184                                          {
185                                                  this.GHTSubTestAddResult(("Application(\"" + text4 + "_" + text4) + "\")  = null");
186                                                  continue;
187                                          }
188                                          this.GHTSubTestAddResult((string)(((("Application(\"" + text4) + "_") + text4) + "\") = " + this.Application[text4 + "_" + text4]));
189                                  }
190                          }
191                          finally
192                          {
193                                  if (enumerator1 is IDisposable)
194                                  {
195                                          ((IDisposable) enumerator1).Dispose();
196                                  }
197                          }
198                  }
199                  catch (Exception exception8)
200                  {
201                          // ProjectData.SetProjectError(exception8);
202                          Exception exception4 = exception8;
203                          this.GHTSubTestUnexpectedExceptionCaught(exception4);
204                          // ProjectData.ClearProjectError();
205                  }
206                  this.GHTSubTestEnd();
207                  this.GHTTestEnd();
208          }
209  
210  }
211 }