forgot this
[mono.git] / mcs / class / System / System.Net / WebException.cs
1 //\r
2 // System.Net.WebException.cs\r
3 //\r
4 // Author:\r
5 //   Lawrence Pit (loz@cable.a2000.nl)\r
6 //\r
7 \r
8 using System.Runtime.Serialization;\r
9 \r
10 namespace System.Net \r
11 {\r
12         [Serializable]\r
13         public class WebException : InvalidOperationException, ISerializable\r
14         {\r
15                 private WebResponse response;\r
16                 private WebExceptionStatus status;\r
17                 \r
18 \r
19                 // Constructors\r
20                 \r
21                 public WebException () : base ()\r
22                 {\r
23                 }\r
24                 \r
25                 public WebException (string message) : base (message)\r
26                 {\r
27                 }\r
28 \r
29                 protected WebException (SerializationInfo serializationInfo,\r
30                                         StreamingContext streamingContext)\r
31                         : base (serializationInfo, streamingContext)\r
32                 {\r
33                 }\r
34 \r
35                 public WebException (string message, Exception innerException)\r
36                         : base (message, innerException)\r
37                 {\r
38                 }\r
39 \r
40                 public WebException (string message, WebExceptionStatus status)\r
41                         : base (message)\r
42                 {\r
43                         this.status = status;\r
44                 }\r
45 \r
46                 public WebException(string message, \r
47                                     Exception innerException,\r
48                                     WebExceptionStatus status, \r
49                                     WebResponse response)\r
50                         : base (message, innerException)                                    \r
51                 {\r
52                         this.status = status;\r
53                         this.response = response;\r
54                 }\r
55                 \r
56                 // Properties\r
57                 \r
58                 public WebResponse Response {\r
59                         get { return this.response; }\r
60                 }\r
61                 \r
62                 public WebExceptionStatus Status {\r
63                         get { return this.status; }\r
64                 }\r
65                 \r
66                 // Methods\r
67                 \r
68                 void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context)\r
69                 {\r
70                         base.GetObjectData (info, context);\r
71                 }\r
72         }\r
73 }\r
74         \r