Skip to content

Instantly share code, notes, and snippets.

@rolfbjarne
Created September 12, 2016 16:53
Show Gist options
  • Select an option

  • Save rolfbjarne/2387f3f3c94ce3af644ca41470ea05e0 to your computer and use it in GitHub Desktop.

Select an option

Save rolfbjarne/2387f3f3c94ce3af644ca41470ea05e0 to your computer and use it in GitHub Desktop.
commit e32e1e07ff71512d6a55c01bae230b2e7281ae34
Author: Rolf Bjarne Kvinge <[email protected]>
Date: Mon Sep 12 14:40:01 2016 +0200
[System] Throw a PlatformNotSupported exception when using the networking stack on watchOS.
diff --git a/mcs/class/System/System.Net.Mail/SmtpClient.platformnotsupported.cs b/mcs/class/System/System.Net.Mail/SmtpClient.platformnotsupported.cs
new file mode 100644
index 0000000..bdc60b9
--- /dev/null
+++ b/mcs/class/System/System.Net.Mail/SmtpClient.platformnotsupported.cs
@@ -0,0 +1,168 @@
+//
+// System.Net.Mail.SmtpClient.cs
+//
+// Author:
+// Rolf Bjarne Kvinge <[email protected]>
+//
+// Copyright (C) 2016 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.
+//
+
+using System.ComponentModel;
+using System.Security.Cryptography.X509Certificates;
+using System.Threading.Tasks;
+
+namespace System.Net.Mail {
+ [Obsolete (SmtpClient.EXCEPTION_MESSAGE)]
+ public class SmtpClient
+ : IDisposable
+ {
+ const string EXCEPTION_MESSAGE = "System.Net.Mail.SmtpClient is not supported on the current platform.";
+
+ public SmtpClient ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public SmtpClient (string host)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public SmtpClient (string host, int port)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+#if SECURITY_DEP
+ [MonoTODO("Client certificates not used")]
+ public X509CertificateCollection ClientCertificates {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+#endif
+
+ public string TargetName { get; set; }
+
+ public ICredentialsByHost Credentials {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public SmtpDeliveryMethod DeliveryMethod {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool EnableSsl {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string Host {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string PickupDirectoryLocation {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public int Port {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public SmtpDeliveryFormat DeliveryFormat {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public ServicePoint ServicePoint {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public int Timeout {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool UseDefaultCredentials {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+#pragma warning disable 0067 // The event `System.Net.Mail.SmtpClient.SendCompleted' is never used
+ public event SendCompletedEventHandler SendCompleted;
+#pragma warning restore 0067
+
+ public void Dispose ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ protected virtual void Dispose (bool disposing)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ protected void OnSendCompleted (AsyncCompletedEventArgs e)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Send (MailMessage message)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Send (string from, string to, string subject, string body)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task SendMailAsync (MailMessage message)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task SendMailAsync (string from, string recipients, string subject, string body)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void SendAsync (MailMessage message, object userToken)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void SendAsync (string from, string to, string subject, string body, object userToken)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void SendAsyncCancel ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+ }
+}
+
diff --git a/mcs/class/System/System.Net.Sockets/TcpClient.platformnotsupported.cs b/mcs/class/System/System.Net.Sockets/TcpClient.platformnotsupported.cs
new file mode 100644
index 0000000..95ebf30
--- /dev/null
+++ b/mcs/class/System/System.Net.Sockets/TcpClient.platformnotsupported.cs
@@ -0,0 +1,192 @@
+//
+// System.Net.Sockets.TcpClient.cs
+//
+// Author:
+// Rolf Bjarne Kvinge <[email protected]>
+//
+// Copyright (C) 2016 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, includingmtpc
+// 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.
+//
+
+using System;
+using System.Net;
+using System.Threading.Tasks;
+
+namespace System.Net.Sockets
+{
+ [Obsolete (TcpClient.EXCEPTION_MESSAGE)]
+ public class TcpClient : IDisposable
+ {
+ const string EXCEPTION_MESSAGE = "System.Net.Sockets.TcpClient is not supported on the current platform.";
+
+ public TcpClient ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public TcpClient (AddressFamily family)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public TcpClient (IPEndPoint localEP)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public TcpClient (string hostname, int port)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ protected bool Active {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public Socket Client {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public int Available {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool Connected {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool ExclusiveAddressUse {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public LingerOption LingerState {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool NoDelay {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public int ReceiveBufferSize {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public int ReceiveTimeout {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public int SendBufferSize {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public int SendTimeout {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public void Close ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Connect (IPEndPoint remoteEP)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Connect (IPAddress address, int port)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Connect (string hostname, int port)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Connect (IPAddress[] ipAddresses, int port)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void EndConnect (IAsyncResult asyncResult)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public IAsyncResult BeginConnect (IPAddress address, int port, AsyncCallback requestCallback, object state)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public IAsyncResult BeginConnect (IPAddress[] addresses, int port, AsyncCallback requestCallback, object state)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public IAsyncResult BeginConnect (string host, int port, AsyncCallback requestCallback, object state)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Dispose ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ protected virtual void Dispose (bool disposing)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ ~TcpClient ()
+ {
+ }
+
+ public NetworkStream GetStream()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task ConnectAsync (IPAddress address, int port)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task ConnectAsync (IPAddress[] addresses, int port)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task ConnectAsync (string host, int port)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+ }
+}
diff --git a/mcs/class/System/System.Net.Sockets/TcpListener.platformnotsupported.cs b/mcs/class/System/System.Net.Sockets/TcpListener.platformnotsupported.cs
new file mode 100644
index 0000000..16a6ddb
--- /dev/null
+++ b/mcs/class/System/System.Net.Sockets/TcpListener.platformnotsupported.cs
@@ -0,0 +1,136 @@
+//
+// System.Net.Sockets.TcpListener.cs
+//
+// Author:
+// Rolf Bjarne Kvinge <[email protected]>
+//
+// Copyright (C) 2016 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, includingmtpc
+// 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.
+//
+
+using System;
+using System.Net;
+using System.Threading.Tasks;
+
+namespace System.Net.Sockets
+{
+ [Obsolete (TcpListener.EXCEPTION_MESSAGE)]
+ public class TcpListener
+ {
+ const string EXCEPTION_MESSAGE = "System.Net.Sockets.TcpListener is not supported on the current platform.";
+
+ public TcpListener (int port)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public TcpListener (IPEndPoint localEP)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public TcpListener (IPAddress localaddr, int port)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ protected bool Active {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public EndPoint LocalEndpoint {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public Socket Server {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool ExclusiveAddressUse {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public Socket AcceptSocket ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public TcpClient AcceptTcpClient ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ ~TcpListener ()
+ {
+ }
+
+ public bool Pending ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Start ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Start (int backlog)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public IAsyncResult BeginAcceptSocket (AsyncCallback callback, object state)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public IAsyncResult BeginAcceptTcpClient (AsyncCallback callback, object state)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Socket EndAcceptSocket (IAsyncResult asyncResult)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public TcpClient EndAcceptTcpClient (IAsyncResult asyncResult)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Stop ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<Socket> AcceptSocketAsync ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<TcpClient> AcceptTcpClientAsync ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+ }
+}
diff --git a/mcs/class/System/System.Net.Sockets/UdpClient.platformnotsupported.cs b/mcs/class/System/System.Net.Sockets/UdpClient.platformnotsupported.cs
new file mode 100644
index 0000000..74c72fe
--- /dev/null
+++ b/mcs/class/System/System.Net.Sockets/UdpClient.platformnotsupported.cs
@@ -0,0 +1,242 @@
+//
+// System.Net.Sockets.UdpClient.cs
+//
+// Author:
+// Rolf Bjarne Kvinge <[email protected]>
+//
+// Copyright (C) 2016 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.
+//
+
+using System;
+using System.Threading.Tasks;
+
+namespace System.Net.Sockets
+{
+ [Obsolete (UdpClient.EXCEPTION_MESSAGE)]
+ public class UdpClient : IDisposable
+ {
+ const string EXCEPTION_MESSAGE = "System.Net.Sockets.UdpClient is not supported on the current platform.";
+
+ public UdpClient ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public UdpClient(AddressFamily family)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public UdpClient (int port)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public UdpClient (IPEndPoint localEP)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public UdpClient (int port, AddressFamily family)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public UdpClient (string hostname, int port)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Close ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Connect (IPEndPoint endPoint)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Connect (IPAddress addr, int port)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Connect (string hostname, int port)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void DropMulticastGroup (IPAddress multicastAddr)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void DropMulticastGroup (IPAddress multicastAddr, int ifindex)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void JoinMulticastGroup (IPAddress multicastAddr)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void JoinMulticastGroup (int ifindex, IPAddress multicastAddr)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void JoinMulticastGroup (IPAddress multicastAddr, int timeToLive)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void JoinMulticastGroup (IPAddress multicastAddr, IPAddress localAddress)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public byte [] Receive (ref IPEndPoint remoteEP)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public int Send (byte [] dgram, int bytes)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public int Send (byte [] dgram, int bytes, IPEndPoint endPoint)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public int Send (byte [] dgram, int bytes, string hostname, int port)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public IAsyncResult BeginSend (byte[] datagram, int bytes, AsyncCallback requestCallback, object state)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public IAsyncResult BeginSend (byte[] datagram, int bytes, IPEndPoint endPoint, AsyncCallback requestCallback, object state)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public IAsyncResult BeginSend (byte[] datagram, int bytes, string hostname, int port, AsyncCallback requestCallback, object state)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public int EndSend (IAsyncResult asyncResult)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public IAsyncResult BeginReceive (AsyncCallback requestCallback, object state)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public byte[] EndReceive (IAsyncResult asyncResult, ref IPEndPoint remoteEP)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ protected bool Active {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public Socket Client {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public int Available {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool DontFragment {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool EnableBroadcast {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool ExclusiveAddressUse {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool MulticastLoopback {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public short Ttl {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public void Dispose ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ protected virtual void Dispose (bool disposing)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ ~UdpClient ()
+ {
+ }
+
+ public Task<UdpReceiveResult> ReceiveAsync ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<int> SendAsync (byte[] datagram, int bytes)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<int> SendAsync (byte[] datagram, int bytes, IPEndPoint endPoint)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<int> SendAsync (byte[] datagram, int bytes, string hostname, int port)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+ }
+}
diff --git a/mcs/class/System/System.Net.WebSockets/ClientWebSocket.platformnotsupported.cs b/mcs/class/System/System.Net.WebSockets/ClientWebSocket.platformnotsupported.cs
new file mode 100644
index 0000000..6683698
--- /dev/null
+++ b/mcs/class/System/System.Net.WebSockets/ClientWebSocket.platformnotsupported.cs
@@ -0,0 +1,99 @@
+//
+// ClientWebSocket.cs
+//
+// Author:
+// Rolf Bjarne Kvinge <[email protected]>
+//
+// Copyright (C) 2016 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, includingmtpc
+// 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.
+//
+
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace System.Net.WebSockets
+{
+ [Obsolete (ClientWebSocket.EXCEPTION_MESSAGE)]
+ public class ClientWebSocket : WebSocket, IDisposable
+ {
+ const string EXCEPTION_MESSAGE = "System.Net.WebSockets.ClientWebSocket is not supported on the current platform.";
+
+ public ClientWebSocket ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override void Dispose ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override void Abort ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public ClientWebSocketOptions Options {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override WebSocketState State {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override WebSocketCloseStatus? CloseStatus {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override string CloseStatusDescription {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override string SubProtocol {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public Task ConnectAsync (Uri uri, CancellationToken cancellationToken)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override Task SendAsync (ArraySegment<byte> buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override Task<WebSocketReceiveResult> ReceiveAsync (ArraySegment<byte> buffer, CancellationToken cancellationToken)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override Task CloseAsync (WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override Task CloseOutputAsync (WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+ }
+}
diff --git a/mcs/class/System/System.Net/Dns.platformnotsupported.cs b/mcs/class/System/System.Net/Dns.platformnotsupported.cs
new file mode 100644
index 0000000..b554239
--- /dev/null
+++ b/mcs/class/System/System.Net/Dns.platformnotsupported.cs
@@ -0,0 +1,176 @@
+//
+// System.Net/Dns.cs
+//
+// Author:
+// Rolf Bjarne Kvinge <[email protected]>
+//
+// Copyright (C) 2016 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.
+//
+
+using System;
+using System.Net.Sockets;
+using System.Text;
+using System.Collections;
+using System.Threading;
+using System.Runtime.CompilerServices;
+using System.Runtime.Remoting.Messaging;
+using System.Threading.Tasks;
+
+#if !MOBILE
+using Mono.Net.Dns;
+#endif
+
+namespace System.Net {
+ [Obsolete (Dns.EXCEPTION_MESSAGE)]
+ public static class Dns {
+ const string EXCEPTION_MESSAGE = "System.Net.Dns is not supported on the current platform.";
+
+ [Obsolete ("Use BeginGetHostEntry instead")]
+ public static IAsyncResult BeginGetHostByName (string hostName, AsyncCallback requestCallback, object stateObject)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ [Obsolete ("Use BeginGetHostEntry instead")]
+ public static IAsyncResult BeginResolve (string hostName, AsyncCallback requestCallback, object stateObject)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public static IAsyncResult BeginGetHostAddresses (string hostNameOrAddress, AsyncCallback requestCallback, object state)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public static IAsyncResult BeginGetHostEntry (string hostNameOrAddress, AsyncCallback requestCallback, object stateObject)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public static IAsyncResult BeginGetHostEntry (IPAddress address, AsyncCallback requestCallback, object stateObject)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ [Obsolete ("Use EndGetHostEntry instead")]
+ public static IPHostEntry EndGetHostByName (IAsyncResult asyncResult)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ [Obsolete ("Use EndGetHostEntry instead")]
+ public static IPHostEntry EndResolve (IAsyncResult asyncResult)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public static IPAddress [] EndGetHostAddresses (IAsyncResult asyncResult)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public static IPHostEntry EndGetHostEntry (IAsyncResult asyncResult)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ [Obsolete ("Use GetHostEntry instead")]
+ public static IPHostEntry GetHostByAddress(IPAddress address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ [Obsolete ("Use GetHostEntry instead")]
+ public static IPHostEntry GetHostByAddress(string address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public static IPHostEntry GetHostEntry (string hostNameOrAddress)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public static IPHostEntry GetHostEntry (IPAddress address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public static IPAddress [] GetHostAddresses (string hostNameOrAddress)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ [Obsolete ("Use GetHostEntry instead")]
+ public static IPHostEntry GetHostByName (string hostName)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public static string GetHostName ()
+ {
+ string hostName;
+
+ bool ret = GetHostName_internal(out hostName);
+
+ if (ret == false)
+ Error_11001 (hostName);
+
+ return hostName;
+ }
+
+ [Obsolete ("Use GetHostEntry instead")]
+ public static IPHostEntry Resolve(string hostName)
+ {
+ if (hostName == null)
+ throw new ArgumentNullException ("hostName");
+
+ IPHostEntry ret = null;
+
+ try {
+ ret = GetHostByAddress(hostName);
+ }
+ catch{}
+
+ if(ret == null)
+ ret = GetHostByName(hostName);
+
+ return ret;
+ }
+
+ public static Task<IPAddress[]> GetHostAddressesAsync (string hostNameOrAddress)
+ {
+ return Task<IPAddress[]>.Factory.FromAsync (BeginGetHostAddresses, EndGetHostAddresses, hostNameOrAddress, null);
+ }
+
+ public static Task<IPHostEntry> GetHostEntryAsync (IPAddress address)
+ {
+ return Task<IPHostEntry>.Factory.FromAsync (BeginGetHostEntry, EndGetHostEntry, address, null);
+ }
+
+ public static Task<IPHostEntry> GetHostEntryAsync (string hostNameOrAddress)
+ {
+ return Task<IPHostEntry>.Factory.FromAsync (BeginGetHostEntry, EndGetHostEntry, hostNameOrAddress, null);
+ }
+ }
+}
+
diff --git a/mcs/class/System/System.Net/FtpRequestCreator.platformnotsupported.cs b/mcs/class/System/System.Net/FtpRequestCreator.platformnotsupported.cs
new file mode 100644
index 0000000..e840ee4
--- /dev/null
+++ b/mcs/class/System/System.Net/FtpRequestCreator.platformnotsupported.cs
@@ -0,0 +1,41 @@
+//
+// System.Net.FtpbRequestCreator.cs
+//
+// Authors:
+// Rolf Bjarne Kvinge <[email protected]>
+//
+// Copyright (C) 2016 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
+{
+ [Obsolete (FtpRequestCreator.EXCEPTION_MESSAGE)]
+ class FtpRequestCreator : IWebRequestCreate
+ {
+ internal const string EXCEPTION_MESSAGE = "System.Net.FtpRequestCreator is not supported on the current platform.";
+ public WebRequest Create (Uri uri)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+ }
+}
diff --git a/mcs/class/System/System.Net/FtpWebRequest.platformnotsupported.cs b/mcs/class/System/System.Net/FtpWebRequest.platformnotsupported.cs
new file mode 100644
index 0000000..1b5c0e1
--- /dev/null
+++ b/mcs/class/System/System.Net/FtpWebRequest.platformnotsupported.cs
@@ -0,0 +1,179 @@
+//
+// System.Net.FtpWebRequest.cs
+//
+// Author:
+// Rolf Bjarne Kvinge <[email protected]>
+//
+// Copyright (C) 2016 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, includingmtpc
+// 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.
+//
+
+using System.IO;
+using System.Security.Cryptography.X509Certificates;
+
+namespace System.Net
+{
+ [Obsolete (FtpWebRequest.EXCEPTION_MESSAGE)]
+ public sealed class FtpWebRequest : WebRequest
+ {
+ const string EXCEPTION_MESSAGE = "System.Net.FtpWebRequest is not supported on the current platform.";
+
+ public X509CertificateCollection ClientCertificates {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override string ConnectionGroupName {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override string ContentType {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override long ContentLength {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public long ContentOffset {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override ICredentials Credentials {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+#if !MOBILE
+ public static new RequestCachePolicy DefaultCachePolicy {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+#endif
+
+ public bool EnableSsl {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override WebHeaderCollection Headers {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool KeepAlive {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override string Method {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override bool PreAuthenticate {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override IWebProxy Proxy {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public int ReadWriteTimeout {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string RenameTo {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override Uri RequestUri {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public ServicePoint ServicePoint {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool UsePassive {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override bool UseDefaultCredentials {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool UseBinary {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override int Timeout {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override void Abort ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override IAsyncResult BeginGetResponse (AsyncCallback callback, object state)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override WebResponse EndGetResponse (IAsyncResult asyncResult)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override WebResponse GetResponse ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override IAsyncResult BeginGetRequestStream (AsyncCallback callback, object state)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override Stream EndGetRequestStream (IAsyncResult asyncResult)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override Stream GetRequestStream ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+ }
+}
diff --git a/mcs/class/System/System.Net/FtpWebResponse.platformnotsupported.cs b/mcs/class/System/System.Net/FtpWebResponse.platformnotsupported.cs
new file mode 100644
index 0000000..76cdc79
--- /dev/null
+++ b/mcs/class/System/System.Net/FtpWebResponse.platformnotsupported.cs
@@ -0,0 +1,88 @@
+//
+// System.Net.FtpWebResponse.cs
+//
+// Author:
+// Rolf Bjarne Kvinge <[email protected]>
+//
+// Copyright (C) 2016 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, includingmtpc
+// 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.
+//
+
+using System.IO;
+
+namespace System.Net
+{
+ [Obsolete (FtpWebResponse.EXCEPTION_MESSAGE)]
+ public class FtpWebResponse : WebResponse
+ {
+ const string EXCEPTION_MESSAGE = "System.Net.FtpWebResponse is not supported on the current platform.";
+
+ public override long ContentLength {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override WebHeaderCollection Headers {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override Uri ResponseUri {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public DateTime LastModified {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string BannerMessage {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string WelcomeMessage {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string ExitMessage {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public FtpStatusCode StatusCode {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override bool SupportsHeaders {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string StatusDescription {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override void Close ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override Stream GetResponseStream ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+ }
+}
diff --git a/mcs/class/System/System.Net/HttpListener.platformnotsupported.cs b/mcs/class/System/System.Net/HttpListener.platformnotsupported.cs
new file mode 100644
index 0000000..c4fa0ed
--- /dev/null
+++ b/mcs/class/System/System.Net/HttpListener.platformnotsupported.cs
@@ -0,0 +1,128 @@
+//
+// System.Net.HttpListener
+//
+// Author:
+// Rolf Bjarne Kvinge <[email protected]>
+//
+// Copyright (C) 2016 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, includingmtpc
+// 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.
+//
+
+using System.Threading.Tasks;
+
+namespace System.Net {
+ [Obsolete (HttpListener.EXCEPTION_MESSAGE)]
+ public sealed class HttpListener : IDisposable
+ {
+ internal const string EXCEPTION_MESSAGE = "System.Net.HttpListener is not supported on the current platform.";
+
+ public HttpListener ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ internal HttpListener (System.Security.Cryptography.X509Certificates.X509Certificate certificate, Mono.Net.Security.IMonoTlsProvider tlsProvider, Mono.Security.Interface.MonoTlsSettings tlsSettings)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public AuthenticationSchemes AuthenticationSchemes {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public AuthenticationSchemeSelector AuthenticationSchemeSelectorDelegate {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool IgnoreWriteExceptions {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool IsListening {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public static bool IsSupported {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public HttpListenerPrefixCollection Prefixes {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string Realm {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool UnsafeConnectionNtlmAuthentication {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public void Abort ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Close ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public IAsyncResult BeginGetContext (AsyncCallback callback, Object state)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public HttpListenerContext EndGetContext (IAsyncResult asyncResult)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public HttpListenerContext GetContext ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Start ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Stop ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ void IDisposable.Dispose ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<HttpListenerContext> GetContextAsync ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+ }
+}
diff --git a/mcs/class/System/System.Net/HttpListenerContext.platformnotsupported.cs b/mcs/class/System/System.Net/HttpListenerContext.platformnotsupported.cs
new file mode 100644
index 0000000..07099b6
--- /dev/null
+++ b/mcs/class/System/System.Net/HttpListenerContext.platformnotsupported.cs
@@ -0,0 +1,65 @@
+//
+// System.Net.HttpListenerContext
+//
+// Author:
+// Rolf Bjarne Kvinge <[email protected]>
+//
+// Copyright (C) 2016 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, includingmtpc
+// 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.
+//
+
+using System.Security.Principal;
+using System.Threading.Tasks;
+using System.Net.WebSockets;
+
+namespace System.Net {
+ [Obsolete (HttpListenerContext.EXCEPTION_MESSAGE)]
+ public sealed class HttpListenerContext {
+ const string EXCEPTION_MESSAGE = "System.Net.HttpListener is not supported on the current platform.";
+
+ public HttpListenerRequest Request {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public HttpListenerResponse Response {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public IPrincipal User {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public Task<HttpListenerWebSocketContext> AcceptWebSocketAsync (string subProtocol)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<HttpListenerWebSocketContext> AcceptWebSocketAsync (string subProtocol, int receiveBufferSize, TimeSpan keepAliveInterval)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<HttpListenerWebSocketContext> AcceptWebSocketAsync (string subProtocol, int receiveBufferSize, TimeSpan keepAliveInterval, ArraySegment<byte> internalBuffer)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+ }
+}
diff --git a/mcs/class/System/System.Net/HttpListenerPrefixCollection.platformnotsupported.cs b/mcs/class/System/System.Net/HttpListenerPrefixCollection.platformnotsupported.cs
new file mode 100644
index 0000000..b771b98
--- /dev/null
+++ b/mcs/class/System/System.Net/HttpListenerPrefixCollection.platformnotsupported.cs
@@ -0,0 +1,90 @@
+//
+// System.Net.HttpListenerPrefixCollection.cs
+//
+// Author:
+// Rolf Bjarne Kvinge <[email protected]>
+//
+// Copyright (C) 2016 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, includingmtpc
+// 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.
+//
+
+using System.Collections;
+using System.Collections.Generic;
+
+namespace System.Net {
+ [Obsolete (HttpListenerPrefixCollection.EXCEPTION_MESSAGE)]
+ public class HttpListenerPrefixCollection : ICollection<string>, IEnumerable<string>, IEnumerable
+ {
+ const string EXCEPTION_MESSAGE = "System.Net.FtpWebRequest is not supported on the current platform.";
+
+ public int Count {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool IsReadOnly {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool IsSynchronized {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public void Add (string uriPrefix)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Clear ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public bool Contains (string uriPrefix)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void CopyTo (string [] array, int offset)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void CopyTo (Array array, int offset)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public IEnumerator<string> GetEnumerator ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ IEnumerator IEnumerable.GetEnumerator ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public bool Remove (string uriPrefix)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+ }
+}
diff --git a/mcs/class/System/System.Net/HttpListenerRequest.platformnotsupported.cs b/mcs/class/System/System.Net/HttpListenerRequest.platformnotsupported.cs
new file mode 100644
index 0000000..ade6120
--- /dev/null
+++ b/mcs/class/System/System.Net/HttpListenerRequest.platformnotsupported.cs
@@ -0,0 +1,178 @@
+//
+// System.Net.HttpListenerRequest
+//
+// Author:
+// Rolf Bjarne Kvinge <[email protected]>
+//
+// Copyright (C) 2016 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, includingmtpc
+// 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.
+//
+
+using System.Collections.Specialized;
+using System.IO;
+using System.Security.Cryptography.X509Certificates;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace System.Net {
+ [Obsolete (HttpListenerRequest.EXCEPTION_MESSAGE)]
+ public sealed class HttpListenerRequest
+ {
+ const string EXCEPTION_MESSAGE = "System.Net.HttpListenerRequest is not supported on the current platform.";
+
+ public string [] AcceptTypes {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public int ClientCertificateError {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public Encoding ContentEncoding {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public long ContentLength64 {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string ContentType {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public CookieCollection Cookies {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool HasEntityBody {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public NameValueCollection Headers {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string HttpMethod {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public Stream InputStream {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool IsAuthenticated {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool IsLocal {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool IsSecureConnection {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool KeepAlive {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public IPEndPoint LocalEndPoint {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public Version ProtocolVersion {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public NameValueCollection QueryString {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string RawUrl {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public IPEndPoint RemoteEndPoint {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public Guid RequestTraceIdentifier {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public Uri Url {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public Uri UrlReferrer {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string UserAgent {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string UserHostAddress {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string UserHostName {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string [] UserLanguages {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public IAsyncResult BeginGetClientCertificate (AsyncCallback requestCallback, object state)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public X509Certificate2 EndGetClientCertificate (IAsyncResult asyncResult)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public X509Certificate2 GetClientCertificate ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public string ServiceName {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public TransportContext TransportContext {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool IsWebSocketRequest {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public Task<X509Certificate2> GetClientCertificateAsync ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+ }
+}
diff --git a/mcs/class/System/System.Net/HttpListenerResponse.platformnotsupported.cs b/mcs/class/System/System.Net/HttpListenerResponse.platformnotsupported.cs
new file mode 100644
index 0000000..98a393e
--- /dev/null
+++ b/mcs/class/System/System.Net/HttpListenerResponse.platformnotsupported.cs
@@ -0,0 +1,142 @@
+//
+// System.Net.HttpListenerResponse
+//
+// Author:
+// Rolf Bjarne Kvinge <[email protected]>
+//
+// Copyright (C) 2016 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, includingmtpc
+// 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.
+//
+
+using System.IO;
+using System.Text;
+
+namespace System.Net {
+ [Obsolete (HttpListenerResponse.EXCEPTION_MESSAGE)]
+ public sealed class HttpListenerResponse : IDisposable
+ {
+ const string EXCEPTION_MESSAGE = "System.Net.HttpListenerResponse is not supported on the current platform.";
+
+ public Encoding ContentEncoding {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public long ContentLength64 {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string ContentType {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public CookieCollection Cookies {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public WebHeaderCollection Headers {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool KeepAlive {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public Stream OutputStream {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public Version ProtocolVersion {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string RedirectLocation {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool SendChunked {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public int StatusCode {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string StatusDescription {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ void IDisposable.Dispose ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Abort ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void AddHeader (string name, string value)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void AppendCookie (Cookie cookie)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void AppendHeader (string name, string value)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Close ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Close (byte [] responseEntity, bool willBlock)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void CopyFrom (HttpListenerResponse templateResponse)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void Redirect (string url)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+ }
+}
diff --git a/mcs/class/System/System.Net/HttpWebRequest.platformnotsupported.cs b/mcs/class/System/System.Net/HttpWebRequest.platformnotsupported.cs
new file mode 100644
index 0000000..ef8b6b2
--- /dev/null
+++ b/mcs/class/System/System.Net/HttpWebRequest.platformnotsupported.cs
@@ -0,0 +1,394 @@
+//
+// System.Net.HttpWebRequest
+//
+// Author:
+// Rolf Bjarne Kvinge <[email protected]>
+//
+// Copyright (C) 2016 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, includingmtpc
+// 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.
+//
+
+using System.IO;
+using System.Net.Security;
+using System.Runtime.Serialization;
+using System.Security.Cryptography.X509Certificates;
+
+namespace System.Net
+{
+ [Serializable]
+ [Obsolete (HttpWebRequest.EXCEPTION_MESSAGE)]
+ public class HttpWebRequest : WebRequest, ISerializable
+ {
+ internal const string EXCEPTION_MESSAGE = "System.Net.HttpWebRequest is not supported on the current platform.";
+
+#if MOBILE
+ public
+#else
+ internal
+#endif
+ HttpWebRequest (Uri uri)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ internal HttpWebRequest (Uri uri, object /* IMonoTlsProvider */ tlsProvider, object /* MonoTlsSettings */ settings = null)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ protected HttpWebRequest (SerializationInfo serializationInfo, StreamingContext streamingContext)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public string Accept {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public Uri Address {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool AllowAutoRedirect {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool AllowWriteStreamBuffering {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public virtual bool AllowReadStreamBuffering {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public DecompressionMethods AutomaticDecompression {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ internal Mono.Net.Security.IMonoTlsProvider TlsProvider {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ internal Mono.Security.Interface.MonoTlsSettings TlsSettings {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public X509CertificateCollection ClientCertificates {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string Connection {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override string ConnectionGroupName {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override long ContentLength {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override string ContentType {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public HttpContinueDelegate ContinueDelegate {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public virtual CookieContainer CookieContainer {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override ICredentials Credentials {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public DateTime Date {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+#if !MOBILE
+ public static new RequestCachePolicy DefaultCachePolicy {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+#endif
+
+ public static int DefaultMaximumErrorResponseLength {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string Expect {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public virtual bool HaveResponse {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override WebHeaderCollection Headers {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string Host {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public DateTime IfModifiedSince {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool KeepAlive {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public int MaximumAutomaticRedirections {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public int MaximumResponseHeadersLength {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public static int DefaultMaximumResponseHeadersLength {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public int ReadWriteTimeout {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public int ContinueTimeout {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string MediaType {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override string Method {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool Pipelined {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override bool PreAuthenticate {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public Version ProtocolVersion {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override IWebProxy Proxy {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string Referer {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override Uri RequestUri {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool SendChunked {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public ServicePoint ServicePoint {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ internal ServicePoint ServicePointNoLock {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public virtual bool SupportsCookieContainer {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override int Timeout {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string TransferEncoding {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override bool UseDefaultCredentials {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string UserAgent {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool UnsafeAuthenticatedConnectionSharing {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ internal ServerCertValidationCallback ServerCertValidationCallback {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ internal Uri AuthUri {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public RemoteCertificateValidationCallback ServerCertificateValidationCallback {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public void AddRange (int range)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void AddRange (int from, int to)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void AddRange (string rangeSpecifier, int range)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void AddRange (string rangeSpecifier, int from, int to)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void AddRange (long range)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void AddRange (long from, long to)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void AddRange (string rangeSpecifier, long range)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void AddRange (string rangeSpecifier, long from, long to)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override IAsyncResult BeginGetRequestStream (AsyncCallback callback, object state)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override Stream EndGetRequestStream (IAsyncResult asyncResult)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override Stream GetRequestStream()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override IAsyncResult BeginGetResponse (AsyncCallback callback, object state)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override WebResponse EndGetResponse (IAsyncResult asyncResult)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Stream EndGetRequestStream (IAsyncResult asyncResult, out TransportContext transportContext)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override WebResponse GetResponse()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override void Abort ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ void ISerializable.GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ protected override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+ }
+}
diff --git a/mcs/class/System/System.Net/HttpWebResponse.platformnotsupported.cs b/mcs/class/System/System.Net/HttpWebResponse.platformnotsupported.cs
new file mode 100644
index 0000000..5b0f344
--- /dev/null
+++ b/mcs/class/System/System.Net/HttpWebResponse.platformnotsupported.cs
@@ -0,0 +1,143 @@
+//
+// System.Net.HttpWebResponse
+//
+// Author:
+// Rolf Bjarne Kvinge <[email protected]>
+//
+// Copyright (C) 2016 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, includingmtpc
+// 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.
+//
+
+using System.IO;
+using System.Runtime.Serialization;
+
+namespace System.Net
+{
+ [Serializable]
+ [Obsolete (HttpWebResponse.EXCEPTION_MESSAGE)]
+ public class HttpWebResponse : WebResponse, ISerializable, IDisposable
+ {
+ const string EXCEPTION_MESSAGE = "System.Net.HttpWebResponse is not supported on the current platform.";
+
+ [Obsolete ("Serialization is obsoleted for this type", false)]
+ protected HttpWebResponse (SerializationInfo serializationInfo, StreamingContext streamingContext)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public string CharacterSet {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string ContentEncoding {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override long ContentLength {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override string ContentType {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public virtual CookieCollection Cookies {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override WebHeaderCollection Headers {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ [MonoTODO]
+ public override bool IsMutuallyAuthenticated {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public DateTime LastModified {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public virtual string Method {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public Version ProtocolVersion {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override Uri ResponseUri {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string Server {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public virtual HttpStatusCode StatusCode {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public virtual string StatusDescription {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public override bool SupportsHeaders {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string GetResponseHeader (string headerName)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override Stream GetResponseStream ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ void ISerializable.GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ protected override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public override void Close ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ void IDisposable.Dispose ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ protected override void Dispose (bool disposing)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+ }
+}
diff --git a/mcs/class/System/System.Net/ServicePoint.platformnotsupported.cs b/mcs/class/System/System.Net/ServicePoint.platformnotsupported.cs
new file mode 100644
index 0000000..fd3429e
--- /dev/null
+++ b/mcs/class/System/System.Net/ServicePoint.platformnotsupported.cs
@@ -0,0 +1,127 @@
+//
+// System.Net.ServicePoint
+//
+// Author:
+// Rolf Bjarne Kvinge <[email protected]>
+//
+// Copyright (C) 2016 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, includingmtpc
+// 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.
+//
+
+using System.Security.Cryptography.X509Certificates;
+
+namespace System.Net
+{
+ [Obsolete (ServicePoint.EXCEPTION_MESSAGE)]
+ public class ServicePoint
+ {
+ const string EXCEPTION_MESSAGE = "System.Net.ServicePoint is not supported on the current platform.";
+
+ public Uri Address {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public BindIPEndPoint BindIPEndPointDelegate {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public int ConnectionLeaseTimeout {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public int ConnectionLimit {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string ConnectionName {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public int CurrentConnections {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public DateTime IdleSince {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public int MaxIdleTime {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public virtual Version ProtocolVersion {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public int ReceiveBufferSize {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool SupportsPipelining {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool Expect100Continue {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool UseNagleAlgorithm {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public void SetTcpKeepAlive (bool enabled, int keepAliveTime, int keepAliveInterval)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public bool CloseConnectionGroup (string connectionGroupName)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public X509Certificate Certificate {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ internal void UpdateServerCertificate(X509Certificate certificate)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public X509Certificate ClientCertificate {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ internal void UpdateClientCertificate(X509Certificate certificate)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+ }
+}
diff --git a/mcs/class/System/System.Net/ServicePointManager.platformnotsupported.cs b/mcs/class/System/System.Net/ServicePointManager.platformnotsupported.cs
new file mode 100644
index 0000000..0ace5a3
--- /dev/null
+++ b/mcs/class/System/System.Net/ServicePointManager.platformnotsupported.cs
@@ -0,0 +1,141 @@
+//
+// System.Net.ServicePointManager
+//
+// Author:
+// Rolf Bjarne Kvinge <[email protected]>
+//
+// Copyright (C) 2016 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, includingmtpc
+// 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.
+//
+
+using System.Net.Security;
+
+namespace System.Net
+{
+ [Obsolete (ServicePointManager.EXCEPTION_MESSAGE)]
+ public partial class ServicePointManager {
+ const string EXCEPTION_MESSAGE = "System.Net.ServicePointManager is not supported on the current platform.";
+
+ public const int DefaultNonPersistentConnectionLimit = 4;
+#if MONOTOUCH
+ public const int DefaultPersistentConnectionLimit = 10;
+#else
+ public const int DefaultPersistentConnectionLimit = 2;
+#endif
+
+ private ServicePointManager ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public static ICertificatePolicy CertificatePolicy {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ internal static ICertificatePolicy GetLegacyCertificatePolicy ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public static bool CheckCertificateRevocationList {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public static int DefaultConnectionLimit {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public static int DnsRefreshTimeout {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public static bool EnableDnsRoundRobin {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public static int MaxServicePointIdleTime {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public static int MaxServicePoints {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public static SecurityProtocolType SecurityProtocol {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ internal static ServerCertValidationCallback ServerCertValidationCallback {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public static RemoteCertificateValidationCallback ServerCertificateValidationCallback {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public static bool Expect100Continue {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public static bool UseNagleAlgorithm {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ internal static bool DisableStrongCrypto {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ internal static bool DisableSendAuxRecord {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public static void SetTcpKeepAlive (bool enabled, int keepAliveTime, int keepAliveInterval)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public static ServicePoint FindServicePoint (Uri address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public static ServicePoint FindServicePoint (string uriString, IWebProxy proxy)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public static ServicePoint FindServicePoint (Uri address, IWebProxy proxy)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+ }
+}
diff --git a/mcs/class/System/System.Net/WebClient.platformnotsupported.cs b/mcs/class/System/System.Net/WebClient.platformnotsupported.cs
new file mode 100644
index 0000000..dccbacf
--- /dev/null
+++ b/mcs/class/System/System.Net/WebClient.platformnotsupported.cs
@@ -0,0 +1,782 @@
+//
+// System.Net.WebClient
+//
+// Author:
+// Rolf Bjarne Kvinge <[email protected]>
+//
+// Copyright (C) 2016 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, includingmtpc
+// 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.
+//
+
+using System.Collections.Specialized;
+using System.ComponentModel;
+using System.IO;
+using System.Net.Cache;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace System.Net {
+ [Obsolete (WebClient.EXCEPTION_MESSAGE)]
+ public class WebClient : Component
+ {
+ internal const string EXCEPTION_MESSAGE = "System.Net.WebClient is not supported on the current platform.";
+
+ public WebClient ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public bool AllowReadStreamBuffering {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool AllowWriteStreamBuffering {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+#pragma warning disable 0067 // The event XXX is never used
+ public event WriteStreamClosedEventHandler WriteStreamClosed;
+#pragma warning restore
+
+ protected virtual void OnWriteStreamClosed (WriteStreamClosedEventArgs e)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Encoding Encoding {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public string BaseAddress {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public ICredentials Credentials {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool UseDefaultCredentials {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public WebHeaderCollection Headers {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public NameValueCollection QueryString {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public WebHeaderCollection ResponseHeaders {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public IWebProxy Proxy {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public RequestCachePolicy CachePolicy {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ set { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ public bool IsBusy {
+ get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
+ }
+
+ protected virtual WebRequest GetWebRequest (Uri address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ protected virtual WebResponse GetWebResponse (WebRequest request)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ protected virtual WebResponse GetWebResponse (WebRequest request, IAsyncResult result)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public byte[] DownloadData (string address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public byte[] DownloadData (Uri address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void DownloadFile (string address, string fileName)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void DownloadFile (Uri address, string fileName)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Stream OpenRead (string address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Stream OpenRead (Uri address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Stream OpenWrite (string address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Stream OpenWrite (Uri address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Stream OpenWrite (string address, string method)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Stream OpenWrite (Uri address, string method)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public byte[] UploadData (string address, byte[] data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public byte[] UploadData (Uri address, byte[] data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public byte[] UploadData (string address, string method, byte[] data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public byte[] UploadData (Uri address, string method, byte[] data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public byte[] UploadFile (string address, string fileName)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public byte[] UploadFile (Uri address, string fileName)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public byte[] UploadFile (string address, string method, string fileName)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public byte[] UploadFile (Uri address, string method, string fileName)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public byte[] UploadValues (string address, NameValueCollection data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public byte[] UploadValues (Uri address, NameValueCollection data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public byte[] UploadValues (string address, string method, NameValueCollection data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public byte[] UploadValues (Uri address, string method, NameValueCollection data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public string UploadString (string address, string data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public string UploadString (Uri address, string data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public string UploadString (string address, string method, string data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public string UploadString (Uri address, string method, string data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public string DownloadString (string address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public string DownloadString (Uri address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+#pragma warning disable 0067 // The event XXX is never used
+ public event OpenReadCompletedEventHandler OpenReadCompleted;
+#pragma warning restore
+ protected virtual void OnOpenReadCompleted (OpenReadCompletedEventArgs e)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void OpenReadAsync (Uri address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void OpenReadAsync (Uri address, object userToken)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+#pragma warning disable 0067 // The event XXX is never used
+ public event OpenWriteCompletedEventHandler OpenWriteCompleted;
+#pragma warning restore
+ protected virtual void OnOpenWriteCompleted (OpenWriteCompletedEventArgs e)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void OpenWriteAsync (Uri address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void OpenWriteAsync (Uri address, string method)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void OpenWriteAsync (Uri address, string method, object userToken)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+#pragma warning disable 0067 // The event XXX is never used
+ public event DownloadStringCompletedEventHandler DownloadStringCompleted;
+#pragma warning restore
+ protected virtual void OnDownloadStringCompleted (DownloadStringCompletedEventArgs e)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void DownloadStringAsync (Uri address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void DownloadStringAsync (Uri address, object userToken)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+#pragma warning disable 0067 // The event XXX is never used
+ public event DownloadDataCompletedEventHandler DownloadDataCompleted;
+#pragma warning restore
+ protected virtual void OnDownloadDataCompleted (DownloadDataCompletedEventArgs e)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void DownloadDataAsync (Uri address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void DownloadDataAsync (Uri address, object userToken)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+#pragma warning disable 0067 // The event XXX is never used
+ public event AsyncCompletedEventHandler DownloadFileCompleted;
+#pragma warning restore
+ protected virtual void OnDownloadFileCompleted (AsyncCompletedEventArgs e)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void DownloadFileAsync (Uri address, string fileName)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void DownloadFileAsync (Uri address, string fileName, object userToken)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+#pragma warning disable 0067 // The event XXX is never used
+ public event UploadStringCompletedEventHandler UploadStringCompleted;
+#pragma warning restore
+ protected virtual void OnUploadStringCompleted (UploadStringCompletedEventArgs e)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void UploadStringAsync (Uri address, string data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void UploadStringAsync (Uri address, string method, string data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void UploadStringAsync (Uri address, string method, string data, object userToken)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+#pragma warning disable 0067 // The event XXX is never used
+ public event UploadDataCompletedEventHandler UploadDataCompleted;
+#pragma warning restore
+ protected virtual void OnUploadDataCompleted (UploadDataCompletedEventArgs e)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void UploadDataAsync (Uri address, byte[] data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void UploadDataAsync (Uri address, string method, byte[] data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void UploadDataAsync (Uri address, string method, byte[] data, object userToken)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+#pragma warning disable 0067 // The event XXX is never used
+ public event UploadFileCompletedEventHandler UploadFileCompleted;
+#pragma warning restore
+ protected virtual void OnUploadFileCompleted (UploadFileCompletedEventArgs e)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void UploadFileAsync (Uri address, string fileName)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void UploadFileAsync (Uri address, string method, string fileName)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void UploadFileAsync (Uri address, string method, string fileName, object userToken)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+#pragma warning disable 0067 // The event XXX is never used
+ public event UploadValuesCompletedEventHandler UploadValuesCompleted;
+#pragma warning restore
+ protected virtual void OnUploadValuesCompleted (UploadValuesCompletedEventArgs e)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void UploadValuesAsync (Uri address, NameValueCollection data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void UploadValuesAsync (Uri address, string method, NameValueCollection data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void UploadValuesAsync (Uri address, string method, NameValueCollection data, object userToken)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public void CancelAsync ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<string> DownloadStringTaskAsync (string address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<string> DownloadStringTaskAsync (Uri address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<Stream> OpenReadTaskAsync (string address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<Stream> OpenReadTaskAsync (Uri address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<Stream> OpenWriteTaskAsync (string address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<Stream> OpenWriteTaskAsync (Uri address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<Stream> OpenWriteTaskAsync (string address, string method)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<Stream> OpenWriteTaskAsync (Uri address, string method)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<string> UploadStringTaskAsync (string address, string data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<string> UploadStringTaskAsync (Uri address, string data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<string> UploadStringTaskAsync (string address, string method, string data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<string> UploadStringTaskAsync (Uri address, string method, string data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<byte[]> DownloadDataTaskAsync (string address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<byte[]> DownloadDataTaskAsync (Uri address)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task DownloadFileTaskAsync (string address, string fileName)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task DownloadFileTaskAsync (Uri address, string fileName)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<byte[]> UploadDataTaskAsync (string address, byte[] data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<byte[]> UploadDataTaskAsync (Uri address, byte[] data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<byte[]> UploadDataTaskAsync (string address, string method, byte[] data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<byte[]> UploadDataTaskAsync (Uri address, string method, byte[] data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<byte[]> UploadFileTaskAsync (string address, string fileName)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<byte[]> UploadFileTaskAsync (Uri address, string fileName)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<byte[]> UploadFileTaskAsync (string address, string method, string fileName)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<byte[]> UploadFileTaskAsync (Uri address, string method, string fileName)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<byte[]> UploadValuesTaskAsync (string address, NameValueCollection data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<byte[]> UploadValuesTaskAsync (string address, string method, NameValueCollection data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<byte[]> UploadValuesTaskAsync (Uri address, NameValueCollection data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public Task<byte[]> UploadValuesTaskAsync (Uri address, string method, NameValueCollection data)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+#pragma warning disable 0067 // The event XXX is never used
+ public event DownloadProgressChangedEventHandler DownloadProgressChanged;
+ public event UploadProgressChangedEventHandler UploadProgressChanged;
+#pragma warning restore
+
+ protected virtual void OnDownloadProgressChanged (DownloadProgressChangedEventArgs e)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ protected virtual void OnUploadProgressChanged (UploadProgressChangedEventArgs e)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+ }
+
+ public delegate void OpenReadCompletedEventHandler (object sender, OpenReadCompletedEventArgs e);
+
+ public class OpenReadCompletedEventArgs : AsyncCompletedEventArgs
+ {
+ OpenReadCompletedEventArgs ()
+ : base (null, false, null)
+ {
+ throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE);
+ }
+
+ public Stream Result {
+ get { throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE); }
+ }
+ }
+
+ public delegate void OpenWriteCompletedEventHandler (object sender, OpenWriteCompletedEventArgs e);
+
+ public class OpenWriteCompletedEventArgs : AsyncCompletedEventArgs
+ {
+ OpenWriteCompletedEventArgs ()
+ : base (null, false, null)
+ {
+ throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE);
+ }
+
+ public Stream Result {
+ get { throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE); }
+ }
+ }
+
+ public delegate void DownloadStringCompletedEventHandler (object sender, DownloadStringCompletedEventArgs e);
+
+ public class DownloadStringCompletedEventArgs : AsyncCompletedEventArgs
+ {
+ DownloadStringCompletedEventArgs ()
+ : base (null, false, null)
+ {
+ throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE);
+ }
+
+ public string Result {
+ get { throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE); }
+ }
+ }
+
+ public delegate void DownloadDataCompletedEventHandler (object sender, DownloadDataCompletedEventArgs e);
+
+ public class DownloadDataCompletedEventArgs : AsyncCompletedEventArgs
+ {
+ DownloadDataCompletedEventArgs ()
+ : base (null, false, null)
+ {
+ throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE);
+ }
+
+ public byte[] Result {
+ get { throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE); }
+ }
+ }
+
+ public delegate void UploadStringCompletedEventHandler (object sender, UploadStringCompletedEventArgs e);
+
+ public class UploadStringCompletedEventArgs : AsyncCompletedEventArgs
+ {
+ UploadStringCompletedEventArgs ()
+ : base (null, false, null)
+ {
+ throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE);
+ }
+
+ public string Result {
+ get { throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE); }
+ }
+ }
+
+ public delegate void UploadDataCompletedEventHandler (object sender, UploadDataCompletedEventArgs e);
+
+ public class UploadDataCompletedEventArgs : AsyncCompletedEventArgs
+ {
+ UploadDataCompletedEventArgs ()
+ : base (null, false, null)
+ {
+ throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE);
+ }
+
+ public byte[] Result {
+ get { throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE); }
+ }
+ }
+
+ public delegate void UploadFileCompletedEventHandler (object sender, UploadFileCompletedEventArgs e);
+
+ public class UploadFileCompletedEventArgs : AsyncCompletedEventArgs
+ {
+ UploadFileCompletedEventArgs ()
+ : base (null, false, null)
+ {
+ throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE);
+ }
+
+ public byte[] Result {
+ get { throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE); }
+ }
+ }
+
+ public delegate void UploadValuesCompletedEventHandler (object sender, UploadValuesCompletedEventArgs e);
+
+ public class UploadValuesCompletedEventArgs : AsyncCompletedEventArgs
+ {
+ UploadValuesCompletedEventArgs ()
+ : base (null, false, null)
+ {
+ throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE);
+ }
+
+ public byte[] Result {
+ get { throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE); }
+ }
+ }
+
+ public delegate void DownloadProgressChangedEventHandler (object sender, DownloadProgressChangedEventArgs e);
+
+ public class DownloadProgressChangedEventArgs : ProgressChangedEventArgs
+ {
+ DownloadProgressChangedEventArgs ()
+ : base (0, null)
+ {
+ throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE);
+ }
+
+ public long BytesReceived {
+ get { throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE); }
+ }
+
+ public long TotalBytesToReceive {
+ get { throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE); }
+ }
+ }
+
+ public delegate void UploadProgressChangedEventHandler (object sender, UploadProgressChangedEventArgs e);
+
+ public class UploadProgressChangedEventArgs : ProgressChangedEventArgs
+ {
+ UploadProgressChangedEventArgs ()
+ : base (0, null)
+ {
+ throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE);
+ }
+
+ public long BytesReceived {
+ get { throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE); }
+ }
+
+ public long TotalBytesToReceive {
+ get { throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE); }
+ }
+
+ public long BytesSent {
+ get { throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE); }
+ }
+
+ public long TotalBytesToSend {
+ get { throw new PlatformNotSupportedException (WebClient.EXCEPTION_MESSAGE); }
+ }
+ }
+}
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Helper2.platformnotsupported.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Helper2.platformnotsupported.cs
new file mode 100644
index 0000000..604e9d2
--- /dev/null
+++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Helper2.platformnotsupported.cs
@@ -0,0 +1,77 @@
+//
+// X509Helper2.cs
+//
+// Author:
+// Rolf Bjarne Kvinge <[email protected]>
+//
+// Copyright (C) 2016 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, includingmtpc
+// 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.
+//
+
+using Mono.Security.Interface;
+
+namespace System.Security.Cryptography.X509Certificates
+{
+ [Obsolete (X509Helper2.EXCEPTION_MESSAGE)]
+ internal static class X509Helper2
+ {
+ internal const string EXCEPTION_MESSAGE = "X509Helper2 is not supported on the current platform.";
+ internal static void Initialize ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ internal static void ThrowIfContextInvalid (X509CertificateImpl impl)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ internal static X509Certificate2Impl Import (byte[] rawData, string password, X509KeyStorageFlags keyStorageFlags)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ internal static X509Certificate2Impl Import (X509Certificate cert)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ internal static X509ChainImpl CreateChainImpl (bool useMachineContext)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ public static bool IsValid (X509ChainImpl impl)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ internal static void ThrowIfContextInvalid (X509ChainImpl impl)
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+
+ internal static Exception GetInvalidChainContextException ()
+ {
+ throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
+ }
+ }
+}
diff --git a/mcs/class/System/monotouch_watch_System.dll.exclude.sources b/mcs/class/System/monotouch_watch_System.dll.exclude.sources
new file mode 100644
index 0000000..7c8c99b
--- /dev/null
+++ b/mcs/class/System/monotouch_watch_System.dll.exclude.sources
@@ -0,0 +1,38 @@
+../referencesource/System/net/System/Net/_PooledStream.cs
+../referencesource/System/net/System/Net/connectionpool.cs
+../referencesource/System/net/System/Net/webclient.cs
+Mono.Net.Security/LegacySslStream.cs
+Mono.Net.Security/MonoLegacyTlsProvider.cs
+System.Net.Mail/SmtpClient.cs
+System.Net.Sockets/TcpClient.cs
+System.Net.Sockets/TcpListener.cs
+System.Net.Sockets/UdpClient.cs
+System.Net.WebSockets/ClientWebSocket.cs
+System.Net/ChunkedInputStream.cs
+System.Net/EndPointListener.cs
+System.Net/EndPointManager.cs
+System.Net/FtpAsyncResult.cs
+System.Net/FtpDataStream.cs
+System.Net/FtpRequestCreator.cs
+System.Net/FtpRequestCreator.cs
+System.Net/FtpStatus.cs
+System.Net/FtpWebRequest.cs
+System.Net/FtpWebResponse.cs
+System.Net/HttpConnection.cs
+System.Net/HttpListener.cs
+System.Net/HttpListenerContext.cs
+System.Net/HttpListenerPrefixCollection.cs
+System.Net/HttpListenerRequest.cs
+System.Net/HttpListenerResponse.cs
+System.Net/HttpWebRequest.cs
+System.Net/HttpWebResponse.cs
+System.Net/IWebConnectionState.cs
+System.Net/ListenerAsyncResult.cs
+System.Net/ResponseStream.cs
+System.Net/ServicePoint.cs
+System.Net/ServicePointManager.cs
+System.Net/WebConnection.cs
+System.Net/WebConnectionData.cs
+System.Net/WebConnectionGroup.cs
+System.Net/WebConnectionStream.cs
+System.Security.Cryptography.X509Certificates/X509Helper2.cs
diff --git a/mcs/class/System/monotouch_watch_System.dll.sources b/mcs/class/System/monotouch_watch_System.dll.sources
index 7c0bd59..a08d9f2 100644
--- a/mcs/class/System/monotouch_watch_System.dll.sources
+++ b/mcs/class/System/monotouch_watch_System.dll.sources
@@ -1 +1,20 @@
#include monotouch_System.dll.sources
+System.Net.Mail/SmtpClient.platformnotsupported.cs
+System.Net.Sockets/TcpClient.platformnotsupported.cs
+System.Net.Sockets/TcpListener.platformnotsupported.cs
+System.Net.Sockets/UdpClient.platformnotsupported.cs
+System.Net.WebSockets/ClientWebSocket.platformnotsupported.cs
+System.Net/FtpRequestCreator.platformnotsupported.cs
+System.Net/FtpWebRequest.platformnotsupported.cs
+System.Net/FtpWebResponse.platformnotsupported.cs
+System.Net/HttpListener.platformnotsupported.cs
+System.Net/HttpListenerContext.platformnotsupported.cs
+System.Net/HttpListenerPrefixCollection.platformnotsupported.cs
+System.Net/HttpListenerRequest.platformnotsupported.cs
+System.Net/HttpListenerResponse.platformnotsupported.cs
+System.Net/HttpWebRequest.platformnotsupported.cs
+System.Net/HttpWebResponse.platformnotsupported.cs
+System.Net/ServicePoint.platformnotsupported.cs
+System.Net/ServicePointManager.platformnotsupported.cs
+System.Net/WebClient.platformnotsupported.cs
+System.Security.Cryptography.X509Certificates/X509Helper2.platformnotsupported.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment