@@ -752,7 +752,7 @@ private void ParseMultipartName()
752
752
}
753
753
}
754
754
755
- internal static readonly MultiPartTableName Null = new MultiPartTableName ( new string [ ] { null , null , null , null } ) ;
755
+ internal static readonly MultiPartTableName Null = new ( new string [ ] { null , null , null , null } ) ;
756
756
}
757
757
758
758
internal static class SslProtocolsHelper
@@ -767,12 +767,13 @@ private static string ToFriendlyName(this SslProtocols protocol)
767
767
{
768
768
name = "TLS 1.3";
769
769
}*/
770
+ #pragma warning disable CA5397 // Do not use deprecated SslProtocols values
770
771
#pragma warning disable CA5398 // Avoid hardcoded SslProtocols values
771
772
if ( ( protocol & SslProtocols . Tls12 ) == SslProtocols . Tls12 )
772
773
{
773
774
name = "TLS 1.2" ;
774
775
}
775
- #if NET
776
+ #if NET8_0_OR_GREATER
776
777
#pragma warning disable SYSLIB0039 // Type or member is obsolete: TLS 1.0 & 1.1 are deprecated
777
778
#endif
778
779
else if ( ( protocol & SslProtocols . Tls11 ) == SslProtocols . Tls11 )
@@ -783,7 +784,7 @@ private static string ToFriendlyName(this SslProtocols protocol)
783
784
{
784
785
name = "TLS 1.0" ;
785
786
}
786
- #if NET
787
+ #if NET8_0_OR_GREATER
787
788
#pragma warning restore SYSLIB0039 // Type or member is obsolete: SSL and TLS 1.0 & 1.1 is deprecated
788
789
#endif
789
790
#pragma warning disable CS0618 // Type or member is obsolete: SSL is deprecated
@@ -796,6 +797,7 @@ private static string ToFriendlyName(this SslProtocols protocol)
796
797
{
797
798
name = "SSL 2.0" ;
798
799
}
800
+ #pragma warning restore CA5397 // Do not use deprecated SslProtocols values
799
801
#pragma warning restore CA5398 // Avoid hardcoded SslProtocols values
800
802
else
801
803
{
@@ -817,17 +819,17 @@ private static string ToFriendlyName(this SslProtocols protocol)
817
819
public static string GetProtocolWarning ( this SslProtocols protocol )
818
820
{
819
821
string message = string . Empty ;
820
- #if NET
822
+ #if NET8_0_OR_GREATER
821
823
#pragma warning disable SYSLIB0039 // Type or member is obsolete: TLS 1.0 & 1.1 are deprecated
822
824
#endif
823
825
#pragma warning disable CS0618 // Type or member is obsolete : SSL is deprecated
824
826
#pragma warning disable CA5397 // Do not use deprecated SslProtocols values
825
- #pragma warning disable CA5398 // Do not use deprecated SslProtocols values
827
+ #pragma warning disable CA5398 // Avoid hardcoded SslProtocols values
826
828
if ( ( protocol & ( SslProtocols . Ssl2 | SslProtocols . Ssl3 | SslProtocols . Tls | SslProtocols . Tls11 ) ) != SslProtocols . None )
827
- #pragma warning restore CA5398 // Do not use deprecated SslProtocols values
829
+ #pragma warning restore CA5398 // Avoid hardcoded SslProtocols values
828
830
#pragma warning restore CA5397 // Do not use deprecated SslProtocols values
829
831
#pragma warning restore CS0618 // Type or member is obsolete : SSL is deprecated
830
- #if NET
832
+ #if NET8_0_OR_GREATER
831
833
#pragma warning restore SYSLIB0039 // Type or member is obsolete: SSL and TLS 1.0 & 1.1 is deprecated
832
834
#endif
833
835
{
0 commit comments