1: using System;
2: using System.Web;
3: //using System.Web.UI;
4:
5: namespace Ia.Cl.Model.AspNetState
6: {
7: ////////////////////////////////////////////////////////////////////////////
8:
9: /// <summary publish="true">
10: /// ASP.NET state support functions: Applications, Session, Coockies, Control.
11: /// </summary>
12: /// <value>
13: /// https://msdn.microsoft.com/en-us/library/z1hkazw7(v=vs.100).aspx
14: /// </value>
15: /// <remarks>
16: /// Copyright © 2001-2015 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
17: ///
18: /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
19: /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
20: ///
21: /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
22: /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
23: ///
24: /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
25: ///
26: /// Copyright notice: This notice may not be removed or altered from any source distribution.
27: /// </remarks>
28: public class View
29: {
30: ////////////////////////////////////////////////////////////////////////////
31:
32: /// <summary>
33: ///
34: /// </summary>
35: public View() { }
36:
37: /*
38: ////////////////////////////////////////////////////////////////////////////
39:
40: /// <summary>
41: ///
42: /// </summary>
43: public static void Write(StateBag viewState, string name, object value)
44: {
45: viewState[name] = value;
46: }
47: */
48:
49: /*
50: ////////////////////////////////////////////////////////////////////////////
51:
52: /// <summary>
53: ///
54: /// </summary>
55: public static object Read(StateBag viewState, string name)
56: {
57: return viewState[name];
58: }
59: */
60:
61: ////////////////////////////////////////////////////////////////////////////
62: ////////////////////////////////////////////////////////////////////////////
63: }
64:
65: ////////////////////////////////////////////////////////////////////////////
66: ////////////////////////////////////////////////////////////////////////////
67:
68:
69:
70:
71:
72:
73: ////////////////////////////////////////////////////////////////////////////
74: ////////////////////////////////////////////////////////////////////////////
75:
76: /// <summary>
77: ///
78: /// </summary>
79: public class Control
80: {
81: ////////////////////////////////////////////////////////////////////////////
82:
83: /// <summary>
84: ///
85: /// </summary>
86: public Control() { }
87:
88: ////////////////////////////////////////////////////////////////////////////
89: ////////////////////////////////////////////////////////////////////////////
90: }
91:
92: ////////////////////////////////////////////////////////////////////////////
93: ////////////////////////////////////////////////////////////////////////////
94:
95:
96:
97:
98:
99:
100: ////////////////////////////////////////////////////////////////////////////
101: ////////////////////////////////////////////////////////////////////////////
102:
103: /// <summary>
104: ///
105: /// </summary>
106: public class Cookie
107: {
108: ////////////////////////////////////////////////////////////////////////////
109:
110: /// <summary>
111: ///
112: /// </summary>
113: public Cookie() { }
114:
115: ////////////////////////////////////////////////////////////////////////////
116:
117: /// <summary>
118: ///
119: /// </summary>
120: public static void Write(string name, string value)
121: {
122: //Write(name, value, 9999);
123: }
124:
125: /*
126: ////////////////////////////////////////////////////////////////////////////
127:
128: /// <summary>
129: ///
130: /// </summary>
131: public static void Write(string name, string value, int lifeInDays)
132: {
133: // this appends a cookie to the collection
134:
135: HttpCookie cookie = new HttpCookie(name, value)
136: {
137: Expires = DateTime.UtcNow.AddHours(3 + 24 * lifeInDays)
138: };
139:
140: HttpContext.Current.Response.Cookies.Add(cookie);
141: }
142: */
143:
144: /*
145: ////////////////////////////////////////////////////////////////////////////
146:
147: /// <summary>
148: ///
149: /// </summary>
150: public static string Read(string name)
151: {
152: // this reads the value of the cookie
153: string value;
154: HttpCookie cookie;
155:
156: cookie = HttpContext.Current.Request.Cookies[name];
157:
158: if (cookie == null) value = null;
159: else value = cookie.Value;
160:
161: return value;
162: }
163: */
164:
165: ////////////////////////////////////////////////////////////////////////////
166: ////////////////////////////////////////////////////////////////////////////
167:
168:
169:
170:
171:
172:
173:
174:
175: ////////////////////////////////////////////////////////////////////////////
176: ////////////////////////////////////////////////////////////////////////////
177:
178: /// <summary>
179: ///
180: /// </summary>
181: public class Application
182: {
183: ////////////////////////////////////////////////////////////////////////////
184:
185: /// <summary>
186: ///
187: /// </summary>
188: public Application() { }
189:
190: ////////////////////////////////////////////////////////////////////////////
191: ////////////////////////////////////////////////////////////////////////////
192: }
193:
194: ////////////////////////////////////////////////////////////////////////////
195: ////////////////////////////////////////////////////////////////////////////
196:
197:
198:
199:
200:
201:
202: ////////////////////////////////////////////////////////////////////////////
203: ////////////////////////////////////////////////////////////////////////////
204:
205: /// <summary>
206: ///
207: /// </summary>
208: public class Session
209: {
210: ////////////////////////////////////////////////////////////////////////////
211:
212: /// <summary>
213: ///
214: /// </summary>
215: public Session() { }
216:
217: ////////////////////////////////////////////////////////////////////////////
218: ////////////////////////////////////////////////////////////////////////////
219: }
220:
221: ////////////////////////////////////////////////////////////////////////////
222: ////////////////////////////////////////////////////////////////////////////
223:
224: }
225: }