| 123456789101112131415161718192021222324252627 |
- using System;
- namespace Model
- {
- [AttributeUsage(AttributeTargets.Class)]
- public class ConfigAttribute: Attribute
- {
- private int ServerType { get; set; }
- public ConfigAttribute(params ServerType[] serverTypes)
- {
- foreach (ServerType serverType in serverTypes)
- {
- this.ServerType |= (int)serverType;
- }
- }
- public bool Contain(ServerType serverType)
- {
- if ((this.ServerType & (int)serverType) == 0)
- {
- return false;
- }
- return true;
- }
- }
- }
|