示例#1
0
 public static bool TargetsMembers(this AttributeTargets targets)
 => targets.HasFlagOf(
     AttributeTargets.Property
     | AttributeTargets.Field
     | AttributeTargets.Method
     | AttributeTargets.Event
     | AttributeTargets.Constructor);
示例#2
0
 public static bool TargetsTypes(this AttributeTargets targets)
 => targets.HasFlagOf(
     AttributeTargets.Class
     | AttributeTargets.Interface
     | AttributeTargets.Struct);