mscorlib(4.0.0.0) API with additions
WebResponse.cs
1 using System.IO;
4 
5 namespace System.Net
6 {
9  [global::__DynamicallyInvokable]
11  {
12  private bool m_IsCacheFresh;
13 
14  private bool m_IsFromCache;
15 
19  public virtual bool IsFromCache => m_IsFromCache;
20 
21  internal bool InternalSetFromCache
22  {
23  set
24  {
25  m_IsFromCache = value;
26  }
27  }
28 
29  internal virtual bool IsCacheFresh => m_IsCacheFresh;
30 
31  internal bool InternalSetIsCacheFresh
32  {
33  set
34  {
35  m_IsCacheFresh = value;
36  }
37  }
38 
42  public virtual bool IsMutuallyAuthenticated => false;
43 
47  [global::__DynamicallyInvokable]
48  public virtual long ContentLength
49  {
50  [global::__DynamicallyInvokable]
51  get
52  {
53  throw ExceptionHelper.PropertyNotImplementedException;
54  }
55  set
56  {
57  throw ExceptionHelper.PropertyNotImplementedException;
58  }
59  }
60 
64  [global::__DynamicallyInvokable]
65  public virtual string ContentType
66  {
67  [global::__DynamicallyInvokable]
68  get
69  {
70  throw ExceptionHelper.PropertyNotImplementedException;
71  }
72  set
73  {
74  throw ExceptionHelper.PropertyNotImplementedException;
75  }
76  }
77 
81  [global::__DynamicallyInvokable]
82  public virtual Uri ResponseUri
83  {
84  [global::__DynamicallyInvokable]
85  get
86  {
87  throw ExceptionHelper.PropertyNotImplementedException;
88  }
89  }
90 
94  [global::__DynamicallyInvokable]
95  public virtual WebHeaderCollection Headers
96  {
97  [global::__DynamicallyInvokable]
98  get
99  {
100  throw ExceptionHelper.PropertyNotImplementedException;
101  }
102  }
103 
107  [global::__DynamicallyInvokable]
108  public virtual bool SupportsHeaders
109  {
110  [global::__DynamicallyInvokable]
111  get
112  {
113  return false;
114  }
115  }
116 
118  [global::__DynamicallyInvokable]
119  protected WebResponse()
120  {
121  }
122 
127  protected WebResponse(SerializationInfo serializationInfo, StreamingContext streamingContext)
128  {
129  }
130 
134  [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter, SerializationFormatter = true)]
135  void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
136  {
137  GetObjectData(serializationInfo, streamingContext);
138  }
139 
143  [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
144  protected virtual void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
145  {
146  }
147 
150  public virtual void Close()
151  {
152  }
153 
155  [global::__DynamicallyInvokable]
156  public void Dispose()
157  {
158  Dispose(disposing: true);
159  GC.SuppressFinalize(this);
160  }
161 
165  [global::__DynamicallyInvokable]
166  protected virtual void Dispose(bool disposing)
167  {
168  if (disposing)
169  {
170  try
171  {
172  Close();
173  }
174  catch
175  {
176  }
177  }
178  }
179 
183  [global::__DynamicallyInvokable]
184  public virtual Stream GetResponseStream()
185  {
186  throw ExceptionHelper.MethodNotImplementedException;
187  }
188  }
189 }
virtual void Dispose(bool disposing)
Releases the unmanaged resources used by the T:System.Net.WebResponse object, and optionally disposes...
Definition: WebResponse.cs:166
Describes a set of security permissions applied to code. This class cannot be inherited.
virtual bool IsMutuallyAuthenticated
Gets a T:System.Boolean value that indicates whether mutual authentication occurred.
Definition: WebResponse.cs:42
static void SuppressFinalize(object obj)
Requests that the common language runtime not call the finalizer for the specified object.
Definition: GC.cs:308
virtual bool IsFromCache
Gets a T:System.Boolean value that indicates whether this response was obtained from the cache.
Definition: WebResponse.cs:19
Provides a mechanism for releasing unmanaged resources.To browse the .NET Framework source code for t...
Definition: IDisposable.cs:8
Definition: __Canon.cs:3
virtual void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
Populates a T:System.Runtime.Serialization.SerializationInfo with the data that is needed to serializ...
Definition: WebResponse.cs:144
WebResponse()
Initializes a new instance of the T:System.Net.WebResponse class.
Definition: WebResponse.cs:119
virtual void Close()
When overridden by a descendant class, closes the response stream.
Definition: WebResponse.cs:150
Describes the source and destination of a given serialized stream, and provides an additional caller-...
Contains protocol headers associated with a request or response.
SecurityAction
Specifies the security actions that can be performed using declarative security.
WebResponse(SerializationInfo serializationInfo, StreamingContext streamingContext)
Initializes a new instance of the T:System.Net.WebResponse class from the specified instances of the ...
Definition: WebResponse.cs:127
Provides a response from a Uniform Resource Identifier (URI). This is an abstract class.
Definition: WebResponse.cs:10
virtual string ContentType
When overridden in a derived class, gets or sets the content type of the data being received.
Definition: WebResponse.cs:66
virtual bool SupportsHeaders
Gets a value that indicates if headers are supported.
Definition: WebResponse.cs:109
Stores all the data needed to serialize or deserialize an object. This class cannot be inherited.
Controls the system garbage collector, a service that automatically reclaims unused memory.
Definition: GC.cs:11
virtual long ContentLength
When overridden in a descendant class, gets or sets the content length of data being received.
Definition: WebResponse.cs:49
Allows an object to control its own serialization and deserialization.
Definition: ISerializable.cs:8
virtual Uri ResponseUri
When overridden in a derived class, gets the URI of the Internet resource that actually responded to ...
Definition: WebResponse.cs:83
Specifies that the class can be serialized.
SecurityPermissionFlag
Specifies access flags for the security permission object.
Provides an object representation of a uniform resource identifier (URI) and easy access to the parts...
Definition: Uri.cs:19
virtual Stream GetResponseStream()
When overridden in a descendant class, returns the data stream from the Internet resource.
Definition: WebResponse.cs:184
void GetObjectData(SerializationInfo info, StreamingContext context)
Populates a T:System.Runtime.Serialization.SerializationInfo with the data needed to serialize the ta...
void Dispose()
Releases the unmanaged resources used by the T:System.Net.WebResponse object.
Definition: WebResponse.cs:156
virtual WebHeaderCollection Headers
When overridden in a derived class, gets a collection of header name-value pairs associated with this...
Definition: WebResponse.cs:96
Provides a generic view of a sequence of bytes. This is an abstract class.To browse the ....
Definition: Stream.cs:16
Enables access to objects across application domain boundaries in applications that support remoting.