-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scanner selector based on assembly type
- Loading branch information
Showing
2 changed files
with
44 additions
and
4 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
src/6.0/Siren.Infrastructure.AssemblyLoad/AssemblyLoader.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System.Linq; | ||
using System.Reflection; | ||
using Microsoft.EntityFrameworkCore.Infrastructure; | ||
|
||
namespace Siren.Infrastructure.AssemblyLoad | ||
{ | ||
public static class AssemblyLoader | ||
{ | ||
public static bool IsASnapshotAssembly(this Assembly assembly) | ||
{ | ||
return | ||
assembly | ||
.GetTypes() | ||
.Any( | ||
o => o.BaseType == typeof(ModelSnapshot) | ||
); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters