Skip to content

Commit 7435ba3

Browse files
committed
Improve platform-specific '#if' logic.
1 parent 5178622 commit 7435ba3

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/MySqlConnector/MySql.Data.MySqlClient/MySqlDataReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
namespace MySql.Data.MySqlClient
1818
{
1919
public sealed class MySqlDataReader : DbDataReader
20-
#if NETSTANDARD1_3 || NETSTANDARD2_0
20+
#if !NET45 && !NET461
2121
, IDbColumnSchemaGenerator
2222
#endif
2323
{

src/MySqlConnector/Utilities/Utility.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
using System.Linq;
66
using System.Net;
77
using System.Runtime.InteropServices;
8-
#if NET45 || NET461
98
using System.Reflection;
10-
#endif
119
using System.Security.Authentication;
1210
using System.Security.Cryptography;
1311
using System.Text;
@@ -30,6 +28,7 @@ public static void Dispose<T>(ref T disposable)
3028
public static string FormatInvariant(this string format, params object[] args) =>
3129
string.Format(CultureInfo.InvariantCulture, format, args);
3230

31+
#if NET45 || NET461 || NETSTANDARD1_3 || NETSTANDARD2_0
3332
public static string GetString(this Encoding encoding, ReadOnlySpan<byte> span)
3433
{
3534
if (span.Length == 0)
@@ -45,7 +44,6 @@ public static string GetString(this Encoding encoding, ReadOnlySpan<byte> span)
4544
#endif
4645
}
4746

48-
#if NET45 || NET461 || NETSTANDARD1_3 || NETSTANDARD2_0
4947
public static unsafe void GetBytes(this Encoding encoding, ReadOnlySpan<char> chars, Span<byte> bytes)
5048
{
5149
fixed (char* charsPtr = chars)

0 commit comments

Comments
 (0)