InjectAttribute.cs 577 B

12345678910111213141516171819202122232425
  1. using System;
  2. namespace IFramework.Inject
  3. {
  4. /// <summary>
  5. /// 注入标记
  6. /// </summary>
  7. [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property,Inherited =false,AllowMultiple =true)]
  8. public class InjectAttribute : Attribute
  9. {
  10. /// <summary>
  11. /// 注入名
  12. /// </summary>
  13. public string name { get;}
  14. /// <summary>
  15. /// ctor
  16. /// </summary>
  17. /// <param name="name"></param>
  18. public InjectAttribute(string name="")
  19. {
  20. this.name = name;
  21. }
  22. }
  23. }