File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
Source/MySql.Data/Authentication Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -36,17 +36,19 @@ static AuthenticationPluginManager()
3636 {
3737 plugins [ "mysql_native_password" ] = new PluginInfo ( "MySql.Data.MySqlClient.Authentication.MySqlNativePasswordPlugin" ) ;
3838 plugins [ "sha256_password" ] = new PluginInfo ( "MySql.Data.MySqlClient.Authentication.Sha256AuthenticationPlugin" ) ;
39- #if ! CF && ! RT && ! NETSTANDARD1_3
39+ #if ! CF && ! RT
4040 plugins [ "authentication_windows_client" ] = new PluginInfo ( "MySql.Data.MySqlClient.Authentication.MySqlWindowsAuthenticationPlugin" ) ;
41+ #if ! NETSTANDARD1_3
4142 if ( MySqlConfiguration . Settings != null && MySqlConfiguration . Settings . AuthenticationPlugins != null )
4243 {
4344 foreach ( AuthenticationPluginConfigurationElement e in MySqlConfiguration . Settings . AuthenticationPlugins )
4445 plugins [ e . Name ] = new PluginInfo ( e . Type ) ;
4546 }
4647#endif
47- }
48+ #endif
49+ }
4850
49- public static MySqlAuthenticationPlugin GetPlugin ( string method )
51+ public static MySqlAuthenticationPlugin GetPlugin ( string method )
5052 {
5153 if ( ! plugins . ContainsKey ( method ) )
5254 throw new MySqlException ( String . Format ( Resources . AuthenticationMethodNotSupported , method ) ) ;
Original file line number Diff line number Diff line change @@ -47,11 +47,10 @@ internal class MySqlWindowsAuthenticationPlugin : MySqlAuthenticationPlugin
4747 protected override void CheckConstraints ( )
4848 {
4949 string platform = String . Empty ;
50- #if ! RT && ! NETSTANDARD1_3
51- int p = ( int ) Environment . OSVersion . Platform ;
52- if ( ( p == 4 ) || ( p == 128 ) )
50+ #if ! RT
51+ if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
5352 platform = "Unix" ;
54- else if ( Environment . OSVersion . Platform == PlatformID . MacOSX )
53+ else if ( RuntimeInformation . IsOSPlatform ( OSPlatform . OSX ) )
5554 platform = "Mac OS/X" ;
5655
5756 if ( ! String . IsNullOrEmpty ( platform ) )
You can’t perform that action at this time.
0 commit comments