mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-22 22:16:13 -04:00
Use pattern matching instead of as expression type checking
This commit is contained in:
@@ -25,8 +25,7 @@ namespace NzbDrone.Core.Test.Framework
|
||||
{
|
||||
BeforeMigration = m =>
|
||||
{
|
||||
var migration = m as TMigration;
|
||||
if (beforeMigration != null && migration != null)
|
||||
if (beforeMigration != null && m is TMigration migration)
|
||||
{
|
||||
beforeMigration(migration);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user