mscorlib(4.0.0.0) API with additions
WebException.cs
3 
4 namespace System.Net
5 {
8  [global::__DynamicallyInvokable]
10  {
11  private WebExceptionStatus m_Status = WebExceptionStatus.UnknownError;
12 
13  private WebResponse m_Response;
14 
15  [NonSerialized]
16  private WebExceptionInternalStatus m_InternalStatus;
17 
20  [global::__DynamicallyInvokable]
22  {
23  [global::__DynamicallyInvokable]
24  get
25  {
26  return m_Status;
27  }
28  }
29 
32  [global::__DynamicallyInvokable]
33  public WebResponse Response
34  {
35  [global::__DynamicallyInvokable]
36  get
37  {
38  return m_Response;
39  }
40  }
41 
42  internal WebExceptionInternalStatus InternalStatus => m_InternalStatus;
43 
45  [global::__DynamicallyInvokable]
46  public WebException()
47  {
48  }
49 
52  [global::__DynamicallyInvokable]
53  public WebException(string message)
54  : this(message, null)
55  {
56  }
57 
61  [global::__DynamicallyInvokable]
62  public WebException(string message, Exception innerException)
63  : base(message, innerException)
64  {
65  }
66 
70  [global::__DynamicallyInvokable]
71  public WebException(string message, WebExceptionStatus status)
72  : this(message, null, status, null)
73  {
74  }
75 
76  internal WebException(string message, WebExceptionStatus status, WebExceptionInternalStatus internalStatus, Exception innerException)
77  : this(message, innerException, status, null, internalStatus)
78  {
79  }
80 
86  [global::__DynamicallyInvokable]
87  public WebException(string message, Exception innerException, WebExceptionStatus status, WebResponse response)
88  : this(message, null, innerException, status, response)
89  {
90  }
91 
92  internal WebException(string message, string data, Exception innerException, WebExceptionStatus status, WebResponse response)
93  : base(message + ((data != null) ? (": '" + data + "'") : ""), innerException)
94  {
95  m_Status = status;
96  m_Response = response;
97  }
98 
99  internal WebException(string message, Exception innerException, WebExceptionStatus status, WebResponse response, WebExceptionInternalStatus internalStatus)
100  : this(message, null, innerException, status, response, internalStatus)
101  {
102  }
103 
104  internal WebException(string message, string data, Exception innerException, WebExceptionStatus status, WebResponse response, WebExceptionInternalStatus internalStatus)
105  : base(message + ((data != null) ? (": '" + data + "'") : ""), innerException)
106  {
107  m_Status = status;
108  m_Response = response;
109  m_InternalStatus = internalStatus;
110  }
111 
115  protected WebException(SerializationInfo serializationInfo, StreamingContext streamingContext)
116  : base(serializationInfo, streamingContext)
117  {
118  }
119 
123  [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)]
124  void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
125  {
126  GetObjectData(serializationInfo, streamingContext);
127  }
128 
132  [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)]
133  public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
134  {
135  base.GetObjectData(serializationInfo, streamingContext);
136  }
137  }
138 }
The exception that is thrown when an error occurs while accessing the network through a pluggable pro...
Definition: WebException.cs:9
Describes a set of security permissions applied to code. This class cannot be inherited.
WebException()
Initializes a new instance of the T:System.Net.WebException class.
Definition: WebException.cs:46
Definition: __Canon.cs:3
WebExceptionStatus Status
Gets the status of the response.
Definition: WebException.cs:22
Describes the source and destination of a given serialized stream, and provides an additional caller-...
override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
Populates a T:System.Runtime.Serialization.SerializationInfo instance with the data needed to seriali...
WebResponse Response
Gets the response that the remote host returned.
Definition: WebException.cs:34
SecurityAction
Specifies the security actions that can be performed using declarative security.
Provides a response from a Uniform Resource Identifier (URI). This is an abstract class.
Definition: WebResponse.cs:10
WebException(SerializationInfo serializationInfo, StreamingContext streamingContext)
Initializes a new instance of the T:System.Net.WebException class from the specified T:System....
Stores all the data needed to serialize or deserialize an object. This class cannot be inherited.
WebException(string message, Exception innerException, WebExceptionStatus status, WebResponse response)
Initializes a new instance of the T:System.Net.WebException class with the specified error message,...
Definition: WebException.cs:87
Exception()
Initializes a new instance of the T:System.Exception class.
Definition: Exception.cs:286
WebExceptionStatus
Defines status codes for the T:System.Net.WebException class.
WebException(string message, Exception innerException)
Initializes a new instance of the T:System.Net.WebException class with the specified error message an...
Definition: WebException.cs:62
Allows an object to control its own serialization and deserialization.
Definition: ISerializable.cs:8
Represents errors that occur during application execution.To browse the .NET Framework source code fo...
Definition: Exception.cs:22
WebException(string message, WebExceptionStatus status)
Initializes a new instance of the T:System.Net.WebException class with the specified error message an...
Definition: WebException.cs:71
Specifies that the class can be serialized.
The exception that is thrown when a method call is invalid for the object's current state.
WebException(string message)
Initializes a new instance of the T:System.Net.WebException class with the specified error message.
Definition: WebException.cs:53
SecurityPermissionFlag
Specifies access flags for the security permission object.
void GetObjectData(SerializationInfo info, StreamingContext context)
Populates a T:System.Runtime.Serialization.SerializationInfo with the data needed to serialize the ta...