Add a more functional (i.e. fewer-stubs) implementation of System.Data.Linq.
[mono.git] / mcs / class / System.Web / System.Web.Configuration_2.0 / CapabilitiesBuild.cs
1 #if NET_2_0
2 /*
3 Used to determine Browser Capabilities by the Browsers UserAgent String and related
4 Browser supplied Headers.
5 Copyright (C) 2002-Present  Owen Brady (Ocean at owenbrady dot net) 
6 and Dean Brettle (dean at brettle dot com)
7
8 Permission is hereby granted, free of charge, to any person obtaining a copy 
9 of this software and associated documentation files (the "Software"), to deal
10 in the Software without restriction, including without limitation the rights 
11 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
12 copies of the Software, and to permit persons to whom the Software is furnished
13 to do so, subject to the following conditions:
14
15 The above copyright notice and this permission notice shall be included in all 
16 copies or substantial portions of the Software.
17
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
19 INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
20 PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
21 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 
22 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
23 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 */
25
26 namespace System.Web.Configuration
27 {
28         using System;
29         using System.Collections.Generic;
30         using System.Text;
31
32         internal abstract class CapabilitiesBuild : ICapabilitiesProcess
33         {
34                 /// <summary>
35                 /// 
36                 /// </summary>
37                 /// <param name="list"></param>
38                 /// <returns></returns>
39                 protected abstract System.Collections.ObjectModel.Collection<string> HeaderNames(System.Collections.ObjectModel.Collection<string> list);
40                 /// <summary>
41                 /// 
42                 /// </summary>
43                 /// <param name="userAgent"></param>
44                 /// <param name="initialCapabilities"></param>
45                 /// <returns></returns>
46                 public System.Web.Configuration.CapabilitiesResult Process(string userAgent, System.Collections.IDictionary initialCapabilities)
47                 {
48                         System.Collections.Specialized.NameValueCollection header;
49                         header = new System.Collections.Specialized.NameValueCollection(1);
50                         header.Add("User-Agent", userAgent);
51                         return Process(header, initialCapabilities);
52                 }
53                 /// <summary>
54                 /// 
55                 /// </summary>
56                 /// <param name="request"></param>
57                 /// <param name="initialCapabilities"></param>
58                 /// <returns></returns>
59                 public System.Web.Configuration.CapabilitiesResult Process(System.Web.HttpRequest request, System.Collections.IDictionary initialCapabilities)
60                 {
61                         if (request != null)
62                         {
63                                 return Process(request.Headers, initialCapabilities);
64                         }
65                         else
66                         {
67                                 return Process("", initialCapabilities);
68                         }
69                 }
70                 /// <summary>
71                 /// 
72                 /// </summary>
73                 /// <param name="header"></param>
74                 /// <param name="initialCapabilities"></param>
75                 /// <returns></returns>
76                 public abstract System.Web.Configuration.CapabilitiesResult Process(System.Collections.Specialized.NameValueCollection header, System.Collections.IDictionary initialCapabilities);
77         }
78 }
79 #endif