Skip to content

Commit e68befb

Browse files
committed
Use new preprocessor tests.
1 parent e589fc8 commit e68befb

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/MySqlConnector/Core/ConnectionPool.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@ private int GetSessionHealth(ServerSession session)
158158
return 0;
159159
}
160160

161-
#if NET45 || NET461 || NET471 || NETSTANDARD1_3 || NETSTANDARD2_0
162-
public async ValueTask<int> ReturnAsync(IOBehavior ioBehavior, ServerSession session)
163-
#else
161+
#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1
164162
public async ValueTask ReturnAsync(IOBehavior ioBehavior, ServerSession session)
163+
#else
164+
public async ValueTask<int> ReturnAsync(IOBehavior ioBehavior, ServerSession session)
165165
#endif
166166
{
167167
if (Log.IsDebugEnabled())
@@ -193,7 +193,7 @@ public async ValueTask ReturnAsync(IOBehavior ioBehavior, ServerSession session)
193193
m_sessionSemaphore.Release();
194194
}
195195

196-
#if NET45 || NET461 || NET471 || NETSTANDARD1_3 || NETSTANDARD2_0
196+
#if !NETCOREAPP2_1_OR_GREATER && !NETSTANDARD2_1
197197
return default;
198198
#endif
199199
}

src/MySqlConnector/Core/ServerSession.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ public ServerSession(ConnectionPool? pool, int poolGeneration, int id)
6868
public bool SupportsSessionTrack => m_supportsSessionTrack;
6969
public bool ProcAccessDenied { get; set; }
7070

71-
#if NET45 || NET461 || NET471 || NETSTANDARD1_3 || NETSTANDARD2_0
72-
public ValueTask<int> ReturnToPoolAsync(IOBehavior ioBehavior, MySqlConnection? owningConnection)
73-
#else
71+
#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1
7472
public ValueTask ReturnToPoolAsync(IOBehavior ioBehavior, MySqlConnection? owningConnection)
73+
#else
74+
public ValueTask<int> ReturnToPoolAsync(IOBehavior ioBehavior, MySqlConnection? owningConnection)
7575
#endif
7676
{
7777
if (Log.IsDebugEnabled())

0 commit comments

Comments
 (0)