AEventAttribute.cs 481 B

1234567891011121314151617181920212223242526
  1. using System;
  2. namespace Model
  3. {
  4. [AttributeUsage(AttributeTargets.Class)]
  5. public abstract class AEventAttribute: Attribute
  6. {
  7. public int Type { get; private set; }
  8. private ServerType ServerType { get; set; }
  9. protected AEventAttribute(int type, ServerType serverType)
  10. {
  11. this.Type = type;
  12. }
  13. public bool Contains(ServerType serverType)
  14. {
  15. if ((this.ServerType & serverType) == 0)
  16. {
  17. return false;
  18. }
  19. return true;
  20. }
  21. }
  22. }