Compare commits
1 commit
b3d1911302
...
e60f8c4015
| Author | SHA1 | Date | |
|---|---|---|---|
|
e60f8c4015 |
1 changed files with 1 additions and 21 deletions
|
|
@ -70,27 +70,7 @@ namespace Yavsc.Helpers
|
|||
|
||||
foreach (var a in System.AppDomain.CurrentDomain.GetAssemblies())
|
||||
{
|
||||
Type[] types;
|
||||
try
|
||||
{
|
||||
types = a.GetTypes();
|
||||
}
|
||||
catch (System.Reflection.ReflectionTypeLoadException rtle)
|
||||
{
|
||||
// Some referenced types failed to load; keep the
|
||||
// ones that did and skip the rest so a flaky
|
||||
// dependency in one assembly does not break
|
||||
// billing initialization for every other assembly.
|
||||
types = rtle.Types.Where(t => t != null).ToArray();
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Assembly itself cannot be loaded (FileNotFoundException
|
||||
// on a referenced assembly, etc.). Skip it entirely.
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach (var c in types)
|
||||
foreach (var c in a.GetTypes())
|
||||
{
|
||||
if (c.IsClass && !c.IsAbstract &&
|
||||
c.GetInterface(nameof(IUserSettings)) != null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue