Commit b98e589
committed
Simplify loading assemblies
Use a HashSet instead of a Dictionary keyed by the assembly full name. If an assembly is loaded twice with the same AssemblyName it will be the same instance so a HashSet (without even a custom IEqualityComparer<Assembly>) is the perfect solution.
Also, Assembly.Load can throw many exceptions but won't return null.
This was initially introduced in 74402f8 but merged incorrectly in ac1b8c8.1 parent 325577e commit b98e589
File tree
1 file changed
+4
-6
lines changed- src/Serilog.Settings.Configuration/Settings/Configuration
1 file changed
+4
-6
lines changedLines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
| 363 | + | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
376 | | - | |
| 375 | + | |
377 | 376 | | |
378 | 377 | | |
379 | 378 | | |
380 | 379 | | |
381 | 380 | | |
382 | 381 | | |
383 | | - | |
384 | | - | |
| 382 | + | |
385 | 383 | | |
386 | 384 | | |
387 | 385 | | |
| |||
396 | 394 | | |
397 | 395 | | |
398 | 396 | | |
399 | | - | |
| 397 | + | |
400 | 398 | | |
401 | 399 | | |
402 | 400 | | |
| |||
0 commit comments