diff --git a/SpineViewer/Exporter/ExportHelper.cs b/SpineViewer/Exporter/ExportHelper.cs index ec889e3..0f08d62 100644 --- a/SpineViewer/Exporter/ExportHelper.cs +++ b/SpineViewer/Exporter/ExportHelper.cs @@ -25,7 +25,7 @@ namespace SpineViewer.Exporter /// /// 导出实现类标记 /// - [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] + [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)] public class ExportImplementationAttribute(ExportType exportType) : Attribute, IImplementationKey { public ExportType ImplementationKey { get; private set; } = exportType; diff --git a/SpineViewer/ImplementationResolver.cs b/SpineViewer/ImplementationResolver.cs index 07eea04..977088d 100644 --- a/SpineViewer/ImplementationResolver.cs +++ b/SpineViewer/ImplementationResolver.cs @@ -32,8 +32,7 @@ namespace SpineViewer var impTypes = Assembly.GetExecutingAssembly().GetTypes().Where(t => baseType.IsAssignableFrom(t) && !t.IsAbstract); foreach (var type in impTypes) { - var attr = type.GetCustomAttribute(); - if (attr is not null) + foreach (var attr in type.GetCustomAttributes()) { var key = attr.ImplementationKey; if (ImplementationTypes.ContainsKey(key))