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