if (values_formated == null)
continue;
- headers.AddValue (header.Key, values_formated);
+ headers.AddInternal (header.Key, values_formated);
}
return wr;
foreach (var header in content.Headers) {
foreach (var value in header.Value) {
- headers.AddValue (header.Key, value);
+ headers.AddInternal (header.Key, value);
}
}
}
[Conditional ("TRACE")]
- internal static void Enter(TraceSource traceSource, object obj, string method, object paramObject) {
- }
+ internal static void Enter(TraceSource traceSource, object obj, string method, object paramObject) {
+ }
+
+ [Conditional ("TRACE")]
+ internal static void Exception(TraceSource traceSource, object obj, string method, Exception e) {
+ }
[Conditional ("TRACE")]
internal static void Exit(TraceSource traceSource, object obj, string method, object retObject) {
}
+ [Conditional ("TRACE")]
internal static void PrintInfo(TraceSource traceSource, object obj, string method, string msg) {
}
+ [Conditional ("TRACE")]
internal static void PrintWarning(TraceSource traceSource, object obj, string method, string msg) {
}
+
+ [Conditional ("TRACE")]
+ internal static void PrintWarning(TraceSource traceSource, string msg) {
+ }
}
#if MOBILE
+++ /dev/null
-//\r
-// System.Net.FileWebRequest\r
-//\r
-// Author:\r
-// Lawrence Pit (loz@cable.a2000.nl)\r
-//\r
-\r
-//\r
-// Permission is hereby granted, free of charge, to any person obtaining\r
-// a copy of this software and associated documentation files (the\r
-// "Software"), to deal in the Software without restriction, including\r
-// without limitation the rights to use, copy, modify, merge, publish,\r
-// distribute, sublicense, and/or sell copies of the Software, and to\r
-// permit persons to whom the Software is furnished to do so, subject to\r
-// the following conditions:\r
-// \r
-// The above copyright notice and this permission notice shall be\r
-// included in all copies or substantial portions of the Software.\r
-// \r
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
-//\r
-\r
-using System;\r
-using System.Collections;\r
-using System.IO;\r
-using System.Runtime.Serialization;\r
-using System.Runtime.Remoting.Messaging;\r
-using System.Threading;\r
-\r
-namespace System.Net \r
-{\r
- [Serializable]\r
- public class FileWebRequest : WebRequest, ISerializable\r
- {\r
- private Uri uri;\r
- private WebHeaderCollection webHeaders;\r
- \r
- private ICredentials credentials;\r
- private string connectionGroup;\r
- private long contentLength;\r
- private FileAccess fileAccess = FileAccess.Read;\r
- private string method = "GET";\r
- private IWebProxy proxy;\r
- private bool preAuthenticate;\r
- private int timeout = 100000;\r
- \r
- private Stream requestStream;\r
- private FileWebResponse webResponse;\r
- private AutoResetEvent requestEndEvent;\r
- private bool requesting;\r
- private bool asyncResponding;\r
- \r
- // Constructors\r
- \r
- internal FileWebRequest (Uri uri) \r
- { \r
- this.uri = uri;\r
- this.webHeaders = new WebHeaderCollection ();\r
- }\r
- \r
- [Obsolete ("Serialization is obsoleted for this type", false)]\r
- protected FileWebRequest (SerializationInfo serializationInfo, StreamingContext streamingContext) \r
- {\r
- SerializationInfo info = serializationInfo;\r
- webHeaders = (WebHeaderCollection) info.GetValue ("headers", typeof (WebHeaderCollection));\r
- proxy = (IWebProxy) info.GetValue ("proxy", typeof (IWebProxy));\r
- uri = (Uri) info.GetValue ("uri", typeof (Uri));\r
- connectionGroup = info.GetString ("connectionGroupName");\r
- method = info.GetString ("method");\r
- contentLength = info.GetInt64 ("contentLength");\r
- timeout = info.GetInt32 ("timeout");\r
- fileAccess = (FileAccess) info.GetValue ("fileAccess", typeof (FileAccess));\r
- preAuthenticate = info.GetBoolean ("preauthenticate");\r
- }\r
- \r
- // Properties\r
- \r
- // currently not used according to spec\r
- public override string ConnectionGroupName {\r
- get { return connectionGroup; }\r
- set { connectionGroup = value; }\r
- }\r
- \r
- public override long ContentLength {\r
- get { return contentLength; }\r
- set {\r
- if (value < 0)\r
- throw new ArgumentException ("The Content-Length value must be greater than or equal to zero.", "value");\r
- contentLength = value;\r
- }\r
- }\r
- \r
- public override string ContentType { \r
- get { return webHeaders ["Content-Type"]; }\r
- set { webHeaders ["Content-Type"] = value; }\r
- }\r
- \r
- public override ICredentials Credentials { \r
- get { return credentials; }\r
- set { credentials = value; }\r
- }\r
- \r
- public override WebHeaderCollection Headers { \r
- get { return webHeaders; }\r
- }\r
- \r
- // currently not used according to spec\r
- public override string Method { \r
- get { return this.method; }\r
- set {\r
- if (value == null || value.Length == 0)\r
- throw new ArgumentException ("Cannot set null or blank "\r
- + "methods on request.", "value");\r
- this.method = value;\r
- }\r
- }\r
- \r
- // currently not used according to spec\r
- public override bool PreAuthenticate { \r
- get { return preAuthenticate; }\r
- set { preAuthenticate = value; }\r
- }\r
- \r
- // currently not used according to spec\r
- public override IWebProxy Proxy {\r
- get { return proxy; }\r
- set { proxy = value; }\r
- }\r
- \r
- public override Uri RequestUri { \r
- get { return this.uri; }\r
- }\r
- \r
- public override int Timeout { \r
- get { return timeout; }\r
- set { \r
- if (value < -1)\r
- throw new ArgumentOutOfRangeException ("Timeout can be "\r
- + "only set to 'System.Threading.Timeout.Infinite' "\r
- + "or a value >= 0.");\r
- timeout = value;\r
- }\r
- }\r
-\r
- public override bool UseDefaultCredentials\r
- {\r
- get {\r
- throw new NotSupportedException ();\r
- }\r
- set {\r
- throw new NotSupportedException ();\r
- }\r
- }\r
- // Methods\r
- \r
- private delegate Stream GetRequestStreamCallback ();\r
- private delegate WebResponse GetResponseCallback ();\r
-\r
- static Exception GetMustImplement ()\r
- {\r
- return new NotImplementedException ();\r
- }\r
- \r
- /* LAMESPEC: Docs suggest this was present in 1.1 and\r
- * 1.0 profiles, but the masterinfos say otherwise\r
- */\r
- [MonoTODO]\r
- public override void Abort ()\r
- {\r
- throw GetMustImplement ();\r
- }\r
-\r
- public override IAsyncResult BeginGetRequestStream (AsyncCallback callback, object state) \r
- {\r
- if (string.Compare ("GET", method, true) == 0 ||\r
- string.Compare ("HEAD", method, true) == 0 ||\r
- string.Compare ("CONNECT", method, true) == 0)\r
- throw new ProtocolViolationException ("Cannot send a content-body with this verb-type.");\r
- lock (this) {\r
- if (asyncResponding || webResponse != null)\r
- throw new InvalidOperationException ("This operation cannot be performed after the request has been submitted.");\r
- if (requesting)\r
- throw new InvalidOperationException ("Cannot re-call start of asynchronous method while a previous call is still in progress.");\r
- requesting = true;\r
- }\r
- GetRequestStreamCallback c = new GetRequestStreamCallback (this.GetRequestStreamInternal);\r
- return c.BeginInvoke (callback, state);\r
- }\r
- \r
- public override Stream EndGetRequestStream (IAsyncResult asyncResult)\r
- {\r
- if (asyncResult == null)\r
- throw new ArgumentNullException ("asyncResult");\r
- if (!asyncResult.IsCompleted)\r
- asyncResult.AsyncWaitHandle.WaitOne ();\r
- AsyncResult async = (AsyncResult) asyncResult;\r
- GetRequestStreamCallback cb = (GetRequestStreamCallback) async.AsyncDelegate;\r
- return cb.EndInvoke (asyncResult);\r
- }\r
-\r
- public override Stream GetRequestStream()\r
- {\r
- IAsyncResult asyncResult = BeginGetRequestStream (null, null);\r
- if (!(asyncResult.AsyncWaitHandle.WaitOne (timeout, false))) {\r
- throw new WebException("The request timed out", WebExceptionStatus.Timeout);\r
- }\r
- return EndGetRequestStream (asyncResult);\r
- }\r
- \r
- internal Stream GetRequestStreamInternal ()\r
- {\r
- this.requestStream = new FileWebStream (\r
- this,\r
- FileMode.Create,\r
- FileAccess.Write, \r
- FileShare.Read);\r
- return this.requestStream;\r
- }\r
- \r
- public override IAsyncResult BeginGetResponse (AsyncCallback callback, object state)\r
- {\r
- lock (this) {\r
- if (asyncResponding)\r
- throw new InvalidOperationException ("Cannot re-call start of asynchronous method while a previous call is still in progress.");\r
- asyncResponding = true;\r
- }\r
- GetResponseCallback c = new GetResponseCallback (this.GetResponseInternal);\r
- return c.BeginInvoke (callback, state);\r
- }\r
- \r
- public override WebResponse EndGetResponse (IAsyncResult asyncResult)\r
- {\r
- if (asyncResult == null)\r
- throw new ArgumentNullException ("asyncResult");\r
- if (!asyncResult.IsCompleted)\r
- asyncResult.AsyncWaitHandle.WaitOne ();\r
- AsyncResult async = (AsyncResult) asyncResult;\r
- GetResponseCallback cb = (GetResponseCallback) async.AsyncDelegate;\r
- FileWebResponse webResponse = (FileWebResponse) cb.EndInvoke(asyncResult);\r
- asyncResponding = false;\r
- if (webResponse.HasError)\r
- throw webResponse.Error;\r
- return webResponse;\r
- }\r
- \r
- public override WebResponse GetResponse ()\r
- {\r
- IAsyncResult asyncResult = BeginGetResponse (null, null);\r
- if (!(asyncResult.AsyncWaitHandle.WaitOne (timeout, false))) {\r
- throw new WebException("The request timed out", WebExceptionStatus.Timeout);\r
- }\r
- return EndGetResponse (asyncResult);\r
- }\r
- \r
- WebResponse GetResponseInternal ()\r
- {\r
- if (webResponse != null)\r
- return webResponse;\r
- lock (this) {\r
- if (requesting) {\r
- requestEndEvent = new AutoResetEvent (false);\r
- }\r
- }\r
- if (requestEndEvent != null) {\r
- requestEndEvent.WaitOne ();\r
- }\r
- FileStream fileStream = null;\r
- try {\r
- fileStream = new FileWebStream (this, FileMode.Open, FileAccess.Read, FileShare.Read);\r
- this.webResponse = new FileWebResponse (this.uri, fileStream);\r
- } catch (Exception ex) {\r
- this.webResponse = new FileWebResponse (this.uri, new WebException (ex.Message, ex));\r
- }\r
- return this.webResponse;\r
- }\r
- \r
- void ISerializable.GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)\r
- {\r
- GetObjectData (serializationInfo, streamingContext);\r
- }\r
-\r
- protected override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)\r
- {\r
- SerializationInfo info = serializationInfo;\r
- info.AddValue ("headers", webHeaders, typeof (WebHeaderCollection));\r
- info.AddValue ("proxy", proxy, typeof (IWebProxy));\r
- info.AddValue ("uri", uri, typeof (Uri));\r
- info.AddValue ("connectionGroupName", connectionGroup);\r
- info.AddValue ("method", method);\r
- info.AddValue ("contentLength", contentLength);\r
- info.AddValue ("timeout", timeout);\r
- info.AddValue ("fileAccess", fileAccess);\r
- info.AddValue ("preauthenticate", false);\r
- }\r
- \r
- internal void Close ()\r
- {\r
- // already done in class below\r
- // if (requestStream != null) {\r
- // requestStream.Close ();\r
- // }\r
-\r
- lock (this) {\r
- requesting = false;\r
- if (requestEndEvent != null) \r
- requestEndEvent.Set ();\r
- // requestEndEvent = null;\r
- }\r
- }\r
- \r
- // to catch the Close called on the FileStream\r
- internal class FileWebStream : FileStream\r
- {\r
- FileWebRequest webRequest;\r
- \r
- internal FileWebStream (FileWebRequest webRequest, \r
- FileMode mode,\r
- FileAccess access,\r
- FileShare share)\r
- : base (webRequest.RequestUri.LocalPath, \r
- mode, access, share)\r
- {\r
- this.webRequest = webRequest;\r
- }\r
- \r
- public override void Close() \r
- {\r
- base.Close ();\r
- FileWebRequest req = webRequest;\r
- webRequest = null;\r
- if (req != null)\r
- req.Close ();\r
- }\r
- }\r
- }\r
-}\r
+++ /dev/null
-//
-// System.Net.FileWebRequestCreator
-//
-// Authors:
-// Gonzalo Paniagua Javier (gonzalo@ximian.com)
-//
-// (C) 2003 Ximian, Inc (http://www.ximian.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Net
-{
- class FileWebRequestCreator : IWebRequestCreate
- {
- internal FileWebRequestCreator ()
- {
- }
-
- public WebRequest Create (Uri uri)
- {
- return new FileWebRequest (uri);
- }
- }
-}
-
+++ /dev/null
-//\r
-// System.Net.FileWebResponse\r
-//\r
-// Author:\r
-// Lawrence Pit (loz@cable.a2000.nl)\r
-//\r
-\r
-//\r
-// Permission is hereby granted, free of charge, to any person obtaining\r
-// a copy of this software and associated documentation files (the\r
-// "Software"), to deal in the Software without restriction, including\r
-// without limitation the rights to use, copy, modify, merge, publish,\r
-// distribute, sublicense, and/or sell copies of the Software, and to\r
-// permit persons to whom the Software is furnished to do so, subject to\r
-// the following conditions:\r
-// \r
-// The above copyright notice and this permission notice shall be\r
-// included in all copies or substantial portions of the Software.\r
-// \r
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
-//\r
-\r
-using System;\r
-using System.IO;\r
-using System.Runtime.Serialization;\r
-\r
-namespace System.Net \r
-{\r
- [Serializable]\r
- public class FileWebResponse : WebResponse, ISerializable, IDisposable\r
- {\r
- private Uri responseUri;\r
- private FileStream fileStream;\r
- private long contentLength;\r
- private WebHeaderCollection webHeaders;\r
- private bool disposed;\r
- Exception exception;\r
- \r
- // Constructors\r
- \r
- internal FileWebResponse (Uri responseUri, FileStream fileStream)\r
- {\r
- try {\r
- this.responseUri = responseUri;\r
- this.fileStream = fileStream;\r
- this.contentLength = fileStream.Length;\r
- this.webHeaders = new WebHeaderCollection ();\r
- this.webHeaders.Add ("Content-Length", Convert.ToString (contentLength));\r
- this.webHeaders.Add ("Content-Type", "application/octet-stream");\r
- } catch (Exception e) {\r
- throw new WebException (e.Message, e);\r
- }\r
- }\r
-\r
- internal FileWebResponse (Uri responseUri, WebException exception)\r
- {\r
- this.responseUri = responseUri;\r
- this.exception = exception;\r
- }\r
- \r
- [Obsolete ("Serialization is obsoleted for this type", false)]\r
- protected FileWebResponse (SerializationInfo serializationInfo, StreamingContext streamingContext)\r
- {\r
- SerializationInfo info = serializationInfo;\r
-\r
- responseUri = (Uri) info.GetValue ("responseUri", typeof (Uri));\r
- contentLength = info.GetInt64 ("contentLength");\r
- webHeaders = (WebHeaderCollection) info.GetValue ("webHeaders", typeof (WebHeaderCollection));\r
- }\r
- \r
- // Properties\r
- internal bool HasError {\r
- get { return exception != null; }\r
- }\r
-\r
- internal Exception Error {\r
- get { return exception; }\r
- }\r
- \r
- public override long ContentLength {\r
- get {\r
- CheckDisposed ();\r
- return this.contentLength;\r
- }\r
- }\r
- \r
- public override string ContentType {\r
- get {\r
- CheckDisposed ();\r
- return "application/octet-stream";\r
- }\r
- }\r
- \r
- public override WebHeaderCollection Headers {\r
- get {\r
- CheckDisposed ();\r
- return this.webHeaders;\r
- }\r
- }\r
- \r
- public override Uri ResponseUri {\r
- get {\r
- CheckDisposed ();\r
- return this.responseUri;\r
- }\r
- }\r
-\r
- // Methods\r
-\r
- void ISerializable.GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)\r
- {\r
- GetObjectData (serializationInfo, streamingContext);\r
- }\r
-\r
- protected override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)\r
- {\r
- SerializationInfo info = serializationInfo;\r
-\r
- info.AddValue ("responseUri", responseUri, typeof (Uri));\r
- info.AddValue ("contentLength", contentLength);\r
- info.AddValue ("webHeaders", webHeaders, typeof (WebHeaderCollection));\r
- }\r
-\r
- public override Stream GetResponseStream()\r
- {\r
- CheckDisposed ();\r
- return this.fileStream;\r
- }\r
- \r
- // Cleaning up stuff\r
- \r
- ~FileWebResponse ()\r
- {\r
- Dispose (false);\r
- } \r
- \r
- public override void Close()\r
- {\r
- ((IDisposable) this).Dispose ();\r
- }\r
-\r
- void IDisposable.Dispose()\r
- {\r
- Dispose (true);\r
- \r
- // see spec, suppress finalization of this object.\r
- GC.SuppressFinalize (this); \r
- }\r
- \r
- protected override\r
- void Dispose (bool disposing)\r
- {\r
- if (this.disposed)\r
- return;\r
- this.disposed = true;\r
- \r
- if (disposing) {\r
- // release managed resources\r
- this.responseUri = null;\r
- this.webHeaders = null;\r
- }\r
- \r
- // release unmanaged resources\r
- FileStream stream = fileStream;\r
- fileStream = null;\r
- if (stream != null)\r
- stream.Close (); // also closes webRequest\r
- base.Dispose (disposing);\r
- }\r
- \r
- private void CheckDisposed ()\r
- {\r
- if (disposed)\r
- throw new ObjectDisposedException (GetType ().FullName);\r
- } \r
- }\r
-}\r
if (!IsHeaderValue (headerValue))
throw new ArgumentException ("invalid header value: " + headerValue, "headerValue");
- AddValue (headerName, headerValue);
+ AddInternal (headerName, headerValue);
}
- internal void AddValue (string headerName, string headerValue)
+ internal void AddInternal (string headerName, string headerValue)
{
base.Add (headerName, headerValue);
}
static IWebProxy defaultWebProxy;
static RequestCachePolicy defaultCachePolicy;
+ internal const int DefaultTimeout = 100000;
+
static WebRequest ()
{
#if MOBILE
void ISerializable.GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
{
- throw new NotSupportedException ();
+ GetObjectData(serializationInfo, streamingContext);
}
protected virtual void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
{
- throw GetMustImplement ();
}
public static bool RegisterPrefix (string prefix, IWebRequestCreate creator)
{
return Task<WebResponse>.Factory.FromAsync (BeginGetResponse, EndGetResponse, null);
}
-
}
}
System.Net/EndPointListener.cs
System.Net/EndPointManager.cs
System.Net/EndpointPermission.cs
-System.Net/FileWebRequestCreator.cs
-System.Net/FileWebRequest.cs
-System.Net/FileWebResponse.cs
System.Net/FtpAsyncResult.cs
System.Net/FtpDataStream.cs
System.Net/FtpRequestCreator.cs
../referencesource/System/net/System/UriScheme.cs
../referencesource/System/net/System/Net/_BufferOffsetSize.cs
+../referencesource/System/net/System/Net/_IStreams.cs
+../referencesource/System/net/System/Net/_NetRes.cs
../referencesource/System/net/System/Net/_LazyAsyncResult.cs
../referencesource/System/net/System/Net/_LoggingObject.cs
../referencesource/System/net/System/Net/_ScatterGatherBuffers.cs
../referencesource/System/net/System/Net/DnsEndPoint.cs
../referencesource/System/net/System/Net/EndPoint.cs
../referencesource/System/net/System/Net/FtpStatusCode.cs
+../referencesource/System/net/System/Net/filewebrequest.cs
+../referencesource/System/net/System/Net/filewebresponse.cs
../referencesource/System/net/System/Net/HttpListenerException.cs
../referencesource/System/net/System/Net/HttpListenerRequestUriBuilder.cs
../referencesource/System/net/System/Net/HttpRequestHeader.cs
../referencesource/System/net/System/Net/webclient.cs
../referencesource/System/net/System/Net/WebException.cs
../referencesource/System/net/System/Net/WebExceptionStatus.cs
+../referencesource/System/net/System/Net/WebHeaderCollection.cs
../referencesource/System/net/System/Net/WebPermission.cs
../referencesource/System/net/System/Net/WebRequestMethods.cs
../referencesource/System/net/System/Net/WebResponse.cs
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#3");
Assert.IsNotNull (ex.Message, "#4");
Assert.IsNotNull (ex.ParamName, "#5");
- Assert.IsFalse (ex.ParamName == "value", "#6");
+ Assert.AreEqual ("value", ex.ParamName, "#6");
Assert.IsNull (ex.InnerException, "#7");
}
}
System.Net/EndPointListener.cs
System.Net/EndPointManager.cs
System.Net/EndpointPermission.cs
-System.Net/FileWebRequest.cs
-System.Net/FileWebRequestCreator.cs
-System.Net/FileWebResponse.cs
System.Net/FtpAsyncResult.cs
System.Net/FtpDataStream.cs
System.Net/FtpRequestCreator.cs
../referencesource/System/net/System/UriScheme.cs
../referencesource/System/net/System/Net/_BufferOffsetSize.cs
+../referencesource/System/net/System/Net/_IStreams.cs
+../referencesource/System/net/System/Net/_NetRes.cs
../referencesource/System/net/System/Net/_LazyAsyncResult.cs
../referencesource/System/net/System/Net/_LoggingObject.cs
../referencesource/System/net/System/Net/_ScatterGatherBuffers.cs
../referencesource/System/net/System/Net/DnsEndPoint.cs
../referencesource/System/net/System/Net/EndPoint.cs
../referencesource/System/net/System/Net/FtpStatusCode.cs
+../referencesource/System/net/System/Net/filewebrequest.cs
+../referencesource/System/net/System/Net/filewebresponse.cs
../referencesource/System/net/System/Net/HttpListenerException.cs
../referencesource/System/net/System/Net/HttpRequestHeader.cs
../referencesource/System/net/System/Net/HttpResponseHeader.cs
../referencesource/System/net/System/Net/webclient.cs
../referencesource/System/net/System/Net/WebException.cs
../referencesource/System/net/System/Net/WebExceptionStatus.cs
+../referencesource/System/net/System/Net/WebHeaderCollection.cs
../referencesource/System/net/System/Net/WebPermission.cs
../referencesource/System/net/System/Net/WebRequestMethods.cs
../referencesource/System/net/System/Net/WebResponse.cs
}
}
-#if MONO_FEATURE_WEB_STACK
internal static WebException IsolatedException {
get {
return new WebException(NetRes.GetWebStatusString("net_requestaborted", WebExceptionStatus.KeepAliveFailure),WebExceptionStatus.KeepAliveFailure, WebExceptionInternalStatus.Isolated, null);
return new WebException(NetRes.GetWebStatusString("net_requestaborted", WebExceptionStatus.RequestProhibitedByCachePolicy), WebExceptionStatus.RequestProhibitedByCachePolicy);
}
}
-#endif
}
internal enum WindowsInstallationType
WriteWait = 2,
}
-#if MONO_FEATURE_WEB_STACK
//
// HttpVerb - used to define various per Verb Properties
//
}
}
-
+#if MONO_FEATURE_WEB_STACK
//
// HttpProtocolUtils - A collection of utility functions for HTTP usage.
//
using System.Globalization;
using System.Security.Permissions;
using System.Diagnostics.CodeAnalysis;
-
+#if !MONO
internal enum WebHeaderCollectionType : ushort {
Unknown,
WebRequest,
m_InnerCollection.Clear();
}
} // class WebHeaderCollection
-
+#endif
internal class CaseInsensitiveAscii : IEqualityComparer, IComparer{
// ASCII char ToLower table
if(Logging.On)Logging.Exception(Logging.Web, this, "BeginGetRequestStream", exception);
throw;
} finally {
+#if !MONO
if (FrameworkEventSource.Log.IsEnabled()) {
LogBeginGetRequestStream(success, synchronous: false);
}
+#endif
GlobalLog.Leave("FileWebRequest::BeginGetRequestSteam");
}
if(Logging.On)Logging.Exception(Logging.Web, this, "BeginGetResponse", exception);
throw;
} finally {
+#if !MONO
if (FrameworkEventSource.Log.IsEnabled()) {
LogBeginGetResponse(success, synchronous: false);
}
+#endif
GlobalLog.Leave("FileWebRequest::BeginGetResponse");
}
throw;
} finally {
GlobalLog.Leave("FileWebRequest::EndGetRequestStream");
+#if !MONO
if (FrameworkEventSource.Log.IsEnabled()) {
LogEndGetRequestStream(success, synchronous: false);
}
+#endif
}
return stream;
} finally {
GlobalLog.Leave("FileWebRequest::EndGetResponse");
+#if !MONO
// there is no statusCode in FileWebRequest object, defaulting it to zero.
if (FrameworkEventSource.Log.IsEnabled()) {
LogEndGetResponse(success, synchronous: false, statusCode: 0);
}
+#endif
}
return response;