diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Linux.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Linux.cs index 5059c40499d5c6..821f9d47a92d93 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Linux.cs +++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Linux.cs @@ -55,12 +55,6 @@ public bool SecureSocketLayer } } - public int ProtocolVersion - { - get => GetPtrValueHelper(LdapOption.LDAP_OPT_VERSION).ToInt32(); - set => SetPtrValueHelper(LdapOption.LDAP_OPT_VERSION, new IntPtr(value)); - } - public ReferralChasingOptions ReferralChasing { get diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Windows.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Windows.cs index cc73449104adf4..a01c9094a9bb56 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Windows.cs +++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Windows.cs @@ -34,12 +34,6 @@ public bool SecureSocketLayer [UnsupportedOSPlatform("windows")] public void StartNewTlsSessionContext() => throw new PlatformNotSupportedException(); - public int ProtocolVersion - { - get => GetIntValueHelper(LdapOption.LDAP_OPT_VERSION); - set => SetIntValueHelper(LdapOption.LDAP_OPT_VERSION, value); - } - public ReferralChasingOptions ReferralChasing { get diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.cs index 42fae51688a49f..0967a05a69b453 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.cs +++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.cs @@ -757,6 +757,12 @@ public void StopTransportLayerSecurity() } } + public int ProtocolVersion + { + get => GetIntValueHelper(LdapOption.LDAP_OPT_VERSION); + set => SetIntValueHelper(LdapOption.LDAP_OPT_VERSION, value); + } + private int GetIntValueHelper(LdapOption option) { if (_connection._disposed)