System.Net.ServicePointManager.ValidateSecurityProtocol C# (CSharp) Method

ValidateSecurityProtocol() private static method

private static ValidateSecurityProtocol ( SecurityProtocolType value ) : void
value SecurityProtocolType
return void
        private static void ValidateSecurityProtocol(SecurityProtocolType value)
        {
            SecurityProtocolType allowed = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
            if ((value & ~allowed) != 0)
            {
                throw new NotSupportedException(SR.net_securityprotocolnotsupported);
            }
        }