mirror of
https://github.com/Ellpeck/Contentless.git
synced 2024-12-22 19:59:23 +01:00
only check exported types so that we don't crash on internal types
This commit is contained in:
parent
33f5c14583
commit
e8e69dc1cc
2 changed files with 3 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
|||
<package>
|
||||
<metadata>
|
||||
<id>Contentless</id>
|
||||
<version>2.0.3</version>
|
||||
<version>2.0.4</version>
|
||||
<authors>Ellpeck</authors>
|
||||
<description>A tool for MonoGame that automatically handles adding assets to the Content Pipeline project</description>
|
||||
<tags>monogame mono xna content pipeline mgcb builder tool library</tags>
|
||||
|
|
|
@ -142,7 +142,7 @@ namespace Contentless {
|
|||
|
||||
private static IEnumerable<ImporterInfo> GetContentImporters() {
|
||||
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) {
|
||||
foreach (var type in assembly.GetTypes()) {
|
||||
foreach (var type in assembly.GetExportedTypes()) {
|
||||
var importer = (ContentImporterAttribute) type.GetCustomAttribute(typeof(ContentImporterAttribute), true);
|
||||
if (importer != null)
|
||||
yield return new ImporterInfo(importer, type);
|
||||
|
@ -152,7 +152,7 @@ namespace Contentless {
|
|||
|
||||
private static IEnumerable<string> GetContentProcessors() {
|
||||
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) {
|
||||
foreach (var type in assembly.GetTypes()) {
|
||||
foreach (var type in assembly.GetExportedTypes()) {
|
||||
var processor = type.GetCustomAttribute(typeof(ContentProcessorAttribute), true);
|
||||
if (processor != null)
|
||||
yield return type.Name;
|
||||
|
|
Loading…
Reference in a new issue