System.Net.SecurityProtocol.ThrowOnNotAllowed C# (CSharp) Method

ThrowOnNotAllowed() public static method

public static ThrowOnNotAllowed ( SslProtocols protocols, bool allowNone = true ) : void
protocols SslProtocols
allowNone bool
return void
        public static void ThrowOnNotAllowed(SslProtocols protocols, bool allowNone = true)
        {
            if ((!allowNone && (protocols == SslProtocols.None)) || ((protocols & ~AllowedSecurityProtocols) != 0))
            {
                throw new NotSupportedException(SR.net_securityprotocolnotsupported);
            }
        }
    }
SecurityProtocol