* ConformanceChecker.cs, BasicProfileChecker.cs: New files that implement
[mono.git] / mcs / class / System.Web.Services / System.Web.Services.Description / WebReference.cs
1 // 
2 // System.Web.Services.Description.WebReference.cs
3 //
4 // Author:
5 //   Lluis Sanchez (lluis@novell.com)
6 //
7 // Copyright (C) Novell, Inc., 2004
8 //
9
10 //
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
18 // 
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
21 // 
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30
31 #if NET_2_0
32
33 using System.Web.Services.Discovery;
34 using System.Collections.Specialized;
35 using System.CodeDom;
36
37 namespace System.Web.Services.Description 
38 {
39         public sealed class WebReference
40         {
41                 DiscoveryClientDocumentCollection _documents;
42                 CodeNamespace _proxyCode;
43                 ServiceDescriptionImportWarnings _warnings;
44                 string _protocolName;
45                 string _appSettingUrlKey;
46                 string _appSettingBaseUrl;
47                 
48                 public WebReference (DiscoveryClientDocumentCollection documents, CodeNamespace proxyCode)
49                 {
50                         if (documents == null) throw new ArgumentNullException ("documents");
51                         if (proxyCode == null) throw new ArgumentNullException ("proxyCode");
52                         
53                         _documents = documents;
54                         _proxyCode = proxyCode;
55                 }
56                 
57                 public WebReference (DiscoveryClientDocumentCollection documents, CodeNamespace proxyCode, string protocolName, string appSettingUrlKey, string appSettingBaseUrl)
58                 {
59                         if (documents == null) throw new ArgumentNullException ("documents");
60                         if (proxyCode == null) throw new ArgumentNullException ("proxyCode");
61                         
62                         _documents = documents;
63                         _proxyCode = proxyCode;
64                         _protocolName = protocolName;
65                         _appSettingUrlKey = appSettingUrlKey;
66                         _appSettingBaseUrl = appSettingBaseUrl;
67                 }
68                 
69                 public string AppSettingBaseUrl {
70                         get { return _appSettingBaseUrl; }
71                 }
72                 
73                 public string AppSettingUrlKey {
74                         get { return _appSettingUrlKey; }
75                 }
76                 
77                 public DiscoveryClientDocumentCollection Documents {
78                         get { return _documents; }
79                 }
80
81                 public string ProtocolName {
82                         get { return _protocolName; }
83                         set { _protocolName = value; }
84                 }
85
86                 public CodeNamespace ProxyCode {
87                         get { return _proxyCode; }
88                 }
89
90                 [MonoTODO]
91                 public StringCollection ValidationWarnings {
92                         get { throw new NotImplementedException (); }
93                 }
94
95                 public ServiceDescriptionImportWarnings Warnings {
96                         get { return _warnings; }
97                         set { _warnings = value; }
98                 }
99         }
100 }
101
102 #endif