GC.SuppressFinalize (this); \r
}\r
\r
+#if NET_4_0\r
+ protected override\r
+#endif \r
void Dispose (bool disposing)\r
{\r
if (this.disposed)\r
fileStream = null;\r
if (stream != null)\r
stream.Close (); // also closes webRequest\r
+#if NET_4_0\r
+ base.Dispose (disposing);\r
+#endif\r
}\r
\r
private void CheckDisposed ()\r
get { return allowBuffering; }
set { allowBuffering = value; }
}
+
+#if NET_4_5
+ public virtual bool AllowReadStreamBuffering {
+ get { return allowBuffering; }
+ set { allowBuffering = value; }
+ }
+#endif
static Exception GetMustImplement ()
{
set { continueDelegate = value; }
}
+#if NET_4_5
+ virtual
+#endif
public CookieContainer CookieContainer {
get { return cookieContainer; }
set { cookieContainer = value; }
}
}
+#if NET_4_5
+ virtual
+#endif
public bool HaveResponse {
get { return haveResponse; }
}
}
}
+#if NET_4_5
+ [MonoTODO]
+ public int ContinueTimeout {
+ get { throw new NotImplementedException (); }
+ set { throw new NotImplementedException (); }
+ }
+#endif
+
public string MediaType {
get { return mediaType; }
set {
}
}
+#if NET_4_5
+ virtual
+#endif
public CookieCollection Cookies {
get {
CheckDisposed ();
}
}
+#if NET_4_5
+ virtual
+#endif
public string Method {
get {
CheckDisposed ();
}
}
+#if NET_4_5
+ virtual
+#endif
public HttpStatusCode StatusCode {
get {
return statusCode;
}
}
+#if NET_4_5
+ virtual
+#endif
public string StatusDescription {
get {
CheckDisposed ();
Dispose (true);
GC.SuppressFinalize (this);
}
-
+
+#if NET_4_0
+ protected override void Dispose (bool disposing)
+ {
+ this.disposed = true;
+ base.Dispose (true);
+ }
+#else
void Dispose (bool disposing)
{
this.disposed = true;
if (disposing)
Close ();
}
+#endif
private void CheckDisposed ()
{
void IDisposable.Dispose()\r
#endif\r
{\r
+#if NET_4_0\r
+ Dispose (true);\r
+#else\r
Close ();\r
+#endif\r
+ }\r
+ \r
+#if NET_4_0\r
+ protected virtual void Dispose (bool disposing)\r
+ {\r
+ if (disposing)\r
+ Close ();\r
}\r
+#endif\r
\r
void ISerializable.GetObjectData\r
(SerializationInfo serializationInfo,\r