Skip to content

Commit c7ad56c

Browse files
committed
Refactoring.
1 parent b3e94af commit c7ad56c

File tree

1 file changed

+6
-6
lines changed
  • Provider/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10

1 file changed

+6
-6
lines changed

Provider/src/FirebirdSql.Data.FirebirdClient/Client/Managed/Version10/GdsDatabase.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -550,22 +550,22 @@ public virtual List<object> GetDatabaseInfo(byte[] items, int bufferLength)
550550

551551
protected void ProcessResponse(IResponse response)
552552
{
553-
if (response != null && response is GenericResponse)
553+
if (response is GenericResponse genericResponse)
554554
{
555-
if (((GenericResponse)response).Exception != null && !((GenericResponse)response).Exception.IsWarning)
555+
if (genericResponse.Exception != null && !genericResponse.Exception.IsWarning)
556556
{
557-
throw ((GenericResponse)response).Exception;
557+
throw genericResponse.Exception;
558558
}
559559
}
560560
}
561561

562562
protected void ProcessResponseWarnings(IResponse response)
563563
{
564-
if (response is GenericResponse)
564+
if (response is GenericResponse genericResponse)
565565
{
566-
if (((GenericResponse)response).Exception != null && ((GenericResponse)response).Exception.IsWarning)
566+
if (genericResponse.Exception != null && genericResponse.Exception.IsWarning)
567567
{
568-
_warningMessage?.Invoke(((GenericResponse)response).Exception);
568+
_warningMessage?.Invoke(genericResponse.Exception);
569569
}
570570
}
571571
}

0 commit comments

Comments
 (0)