diff --git a/src/NetworkExtension/NECompat.cs b/src/NetworkExtension/NECompat.cs index 0a6bbf3710..7819e89466 100644 --- a/src/NetworkExtension/NECompat.cs +++ b/src/NetworkExtension/NECompat.cs @@ -4,7 +4,7 @@ using Foundation; namespace NetworkExtension { -#if !XAMCORE_4_0 +#if !NET public partial class NEPacketTunnelNetworkSettings { [Obsolete ("This constructor does not create a valid instance of the type.")] diff --git a/src/networkextension.cs b/src/networkextension.cs index a362d9b534..2268e15899 100644 --- a/src/networkextension.cs +++ b/src/networkextension.cs @@ -221,7 +221,7 @@ namespace NetworkExtension { [Export ("isBound")] bool IsBound { get; } -#if !XAMCORE_4_0 +#if !NET [Field ("NEAppProxyErrorDomain")] NSString ErrorDomain { get; } #endif @@ -561,7 +561,7 @@ namespace NetworkExtension { [Export ("grade", ArgumentSemantic.Assign)] NEFilterManagerGrade Grade { get; set; } -#if !XAMCORE_4_0 +#if !NET [Field ("NEFilterErrorDomain")] NSString ErrorDomain { get; } #endif @@ -1087,7 +1087,7 @@ namespace NetworkExtension { NEAppRule[] CopyAppRules (); // CopyAppRules was incorrectly bound to AppRules and it is only available on macOS -#if XAMCORE_4_0 || MONOMAC || __MACCATALYST__ +#if NET || MONOMAC || __MACCATALYST__ [NoWatch, NoTV, NoiOS, Mac (10,15,4), MacCatalyst (15,0)] [Export ("appRules", ArgumentSemantic.Copy)] NEAppRule[] AppRules { get; set; } @@ -1115,7 +1115,7 @@ namespace NetworkExtension { [Export ("contactsDomains", ArgumentSemantic.Copy)] string[] ContactsDomains { get; set; } -#if !XAMCORE_4_0 +#if !NET [Field ("NETunnelProviderErrorDomain")] NSString ErrorDomain { get; } #endif @@ -1183,7 +1183,7 @@ namespace NetworkExtension { [Export ("setAuthorization:")] void _SetAuthorization (IntPtr auth); -#if !XAMCORE_4_0 +#if !NET [Field ("NEVPNErrorDomain")] NSString ErrorDomain { get; } #endif @@ -1707,7 +1707,7 @@ namespace NetworkExtension { [Export ("socketFamily")] int SocketFamily { get; -#if !XAMCORE_4_0 +#if !NET [NotImplemented] set; #endif } @@ -1715,7 +1715,7 @@ namespace NetworkExtension { [Export ("socketType")] int SocketType { get; -#if !XAMCORE_4_0 +#if !NET [NotImplemented] set; #endif } @@ -1723,7 +1723,7 @@ namespace NetworkExtension { [Export ("socketProtocol")] int SocketProtocol { get; -#if !XAMCORE_4_0 +#if !NET [NotImplemented] set; #endif } diff --git a/tests/monotouch-test/NetworkExtension/VpnManagerTest.cs b/tests/monotouch-test/NetworkExtension/VpnManagerTest.cs index 48742e4e60..98905203e8 100644 --- a/tests/monotouch-test/NetworkExtension/VpnManagerTest.cs +++ b/tests/monotouch-test/NetworkExtension/VpnManagerTest.cs @@ -65,7 +65,7 @@ namespace MonoTouchFixtures.NetworkExtension { TestRuntime.AssertSystemVersion (ApplePlatform.iOS, 8, 0, throwIfOtherPlatform: false); TestRuntime.AssertSystemVersion (ApplePlatform.MacOSX, 10, 11, throwIfOtherPlatform: false); - Assert.That (NEVpnManager.ErrorDomain.ToString (), Is.EqualTo ("NEVPNErrorDomain"), "ErrorDomain"); + Assert.That (NEVpnError.ConnectionFailed.GetDomain ().ToString (), Is.EqualTo ("NEVPNErrorDomain"), "ErrorDomain"); } } }