[System] Adds watch specific HttpListenerWebSocketContext
authorMarek Safar <marek.safar@gmail.com>
Wed, 31 May 2017 17:16:38 +0000 (19:16 +0200)
committerMarek Safar <marek.safar@gmail.com>
Wed, 31 May 2017 17:16:38 +0000 (19:16 +0200)
mcs/class/System/System.Net.WebSockets/HttpListenerWebSocketContext.platformnotsupported.cs [new file with mode: 0644]
mcs/class/System/common.sources
mcs/class/System/common_networking.sources
mcs/class/System/monotouch_watch_System.dll.sources

diff --git a/mcs/class/System/System.Net.WebSockets/HttpListenerWebSocketContext.platformnotsupported.cs b/mcs/class/System/System.Net.WebSockets/HttpListenerWebSocketContext.platformnotsupported.cs
new file mode 100644 (file)
index 0000000..99fc21b
--- /dev/null
@@ -0,0 +1,48 @@
+//
+// HttpListenerWebSocketContext.platformnotsupported.cs
+//
+// Author:
+//       Marek Safar <marek.safar@gmail.com>
+//
+// Copyright (c) 2017 Xamarin Inc. (http://www.xamarin.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.WebSockets
+{
+       public partial class HttpListenerWebSocketContext : System.Net.WebSockets.WebSocketContext
+       {
+               const string EXCEPTION_MESSAGE = "System.Net.WebSockets.HttpListenerWebSocketContext is not supported on the current platform.";
+
+               private HttpListenerWebSocketContext() { }
+               public override System.Net.CookieCollection CookieCollection { get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); } }
+               public override System.Collections.Specialized.NameValueCollection Headers { get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); } }
+               public override bool IsAuthenticated { get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); } }
+               public override bool IsLocal { get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); } }
+               public override bool IsSecureConnection { get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); } }
+               public override string Origin { get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); } }
+               public override System.Uri RequestUri { get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); } }
+               public override string SecWebSocketKey { get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); } }
+               public override System.Collections.Generic.IEnumerable<string> SecWebSocketProtocols { get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); } }
+               public override string SecWebSocketVersion { get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); } }
+               public override System.Security.Principal.IPrincipal User { get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); } }
+               public override System.Net.WebSockets.WebSocket WebSocket { get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); } }
+       }
+}
\ No newline at end of file
index 61e5b6472b96582b820051cf9f4e7de47e65aa85..f20e501c6878d4a4eb5487887e2de1265b12d68b 100644 (file)
@@ -918,8 +918,6 @@ corefx/SR.cs
 ../../../external/corefx/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/ClientWebSocketOptions.cs
 ../../../external/corefx/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/WebSocketHandle.Managed.cs
 
-../../../external/corefx/src/System.Net.HttpListener/src/System/Net/WebSockets/HttpListenerWebSocketContext.cs
-
 ../../../external/corefx/src/System.Private.Uri/src/System/UriBuilder.cs
 
 ../../../external/corefx/src/System.Runtime.Extensions/src/System/CodeDom/Compiler/IndentedTextWriter.cs
index 548180b26cb54581b23037a3fba50b27d110973b..f161a1657e9e8f21a53aeb135f7a0271d4ea5b82 100644 (file)
@@ -51,3 +51,5 @@ System.Net/WebConnectionStream.cs
 ../referencesource/System/net/System/Net/Sockets/TCPClient.cs
 ../referencesource/System/net/System/Net/Sockets/TCPListener.cs
 ../referencesource/System/net/System/Net/Sockets/UDPClient.cs
+
+../../../external/corefx/src/System.Net.HttpListener/src/System/Net/WebSockets/HttpListenerWebSocketContext.cs
index ad5e4c7bee884a6c7cc123110d6a27ecf7e6567b..c639ae74fae81646c705daed98799b1a5629ab9e 100644 (file)
@@ -19,4 +19,5 @@ System.Net/HttpWebRequest.platformnotsupported.cs
 System.Net/HttpWebResponse.platformnotsupported.cs
 System.Net/ServicePoint.platformnotsupported.cs
 System.Net/ServicePointManager.platformnotsupported.cs
+System.Net.WebSockets/HttpListenerWebSocketContext.platformnotsupported.cs
 ../Mono.Security/Mono.Security.X509.Extensions/AuthorityKeyIdentifierExtension.cs