Skip to content

Commit 739416c

Browse files
committed
Use not patterns.
1 parent a8dfa48 commit 739416c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ private T ChangeType(object objectValue)
752752
{
753753
return (T) Enum.Parse(typeof(T), enumString, ignoreCase: true);
754754
}
755-
catch (Exception ex) when (!(ex is ArgumentException))
755+
catch (Exception ex) when (ex is not ArgumentException)
756756
{
757757
throw new ArgumentException("Value '{0}' not supported for option '{1}'.".FormatInvariant(objectValue, typeof(T).Name), ex);
758758
}

tests/SideBySide/BulkLoaderAsync.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public async Task BulkLoadCsvFileNotFound()
137137
while (exception.InnerException is not null)
138138
exception = exception.InnerException;
139139

140-
if (!(exception is FileNotFoundException))
140+
if (exception is not FileNotFoundException)
141141
{
142142
try
143143
{

tests/SideBySide/BulkLoaderSync.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public void BulkLoadCsvFileNotFound()
155155
while (exception.InnerException is not null)
156156
exception = exception.InnerException;
157157

158-
if (!(exception is FileNotFoundException))
158+
if (exception is not FileNotFoundException)
159159
{
160160
try
161161
{

0 commit comments

Comments
 (0)