public override AttributeTargets AttributeTargets {
get {
- throw new NotSupportedException ();
+ switch (Kind) {
+ case Kind.Class:
+ return AttributeTargets.Class;
+ case Kind.Struct:
+ return AttributeTargets.Struct;
+ case Kind.Interface:
+ return AttributeTargets.Interface;
+ default:
+ throw new NotSupportedException ();
+ }
}
}
}
}
- public override AttributeTargets AttributeTargets {
- get {
- return AttributeTargets.Class;
- }
- }
-
public override void ApplyAttributeBuilder(Attribute a, CustomAttributeBuilder cb)
{
if (a.UsageAttribute != null) {
this.ModFlags |= Modifiers.SEALED;
}
- public override AttributeTargets AttributeTargets {
- get {
- return AttributeTargets.Struct;
- }
- }
-
public const TypeAttributes DefaultTypeAttributes =
TypeAttributes.SequentialLayout |
TypeAttributes.Sealed |
return null;
}
- public override AttributeTargets AttributeTargets {
- get {
- return AttributeTargets.Interface;
- }
- }
-
public const TypeAttributes DefaultTypeAttributes =
TypeAttributes.AutoLayout |
TypeAttributes.Abstract |