提取ImplementationResolver实现

This commit is contained in:
ww-rm
2025-03-29 15:12:50 +08:00
parent 00f5791766
commit b69589394a
10 changed files with 95 additions and 151 deletions

View File

@@ -26,14 +26,9 @@ namespace SpineViewer.Exporter
/// 导出实现类标记
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public class ExportImplementationAttribute : Attribute
public class ExportImplementationAttribute(ExportType exportType) : Attribute, IImplementationKey<ExportType>
{
public ExportType ExportType { get; }
public ExportImplementationAttribute(ExportType exportType)
{
ExportType = exportType;
}
public ExportType ImplementationKey { get; private set; } = exportType;
}
/// <summary>