using JiShe.CollectBus.Common.Interfaces; namespace JiShe.CollectBus.Common.Attributes { [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)] public class DependsOnAttribute : Attribute { // 依赖的模块 public Type ModuleType { get; private init; } public DependsOnAttribute(Type type) { ModuleType = type; } } [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)] public sealed class DependsOnAttribute : DependsOnAttribute where TModule : IJiSheModule { public DependsOnAttribute() : base(typeof(TModule)) { } } }