1
0
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:
Martin
2021-12-18 04:16:00 +01:00
committed by GitHub
parent 201004113e
commit e2b16adec6
9 changed files with 13 additions and 28 deletions
@@ -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);
}