AttributeTargets enumeration

[This documentation is preliminary and is subject to change.]

Represents the types that a custom attribute applies to.

Syntax

typedef enum _AttributeTargets {
  All              = 0xFFFFFFFF,
  Delegate         = 1,
  Enum             = 2,
  Event            = 4,
  Field            = 8,
  Interface        = 16,
  InterfaceGroup   = 32,
  Method           = 64,
  Parameter        = 128,
  Property         = 256,
  RuntimeClass     = 512,
  Struct           = 1024,
  InterfaceImpl    = 2048 
} AttributeTargets;

Constants

  • All
    Custom attribute applies to any IDL element.

  • Delegate
    Custom attribute applies to a delegate type.

  • Enum
    Custom attribute applies to an enumeration type.

  • Event
    Custom attribute applies to an event.

  • Field
    Custom attribute applies to struct and enum fields.

  • Interface
    Custom attribute applies to an interface.

  • InterfaceGroup
    Custom attribute applies to an interface group.

  • Method
    Custom attribute applies to a method.

  • Parameter
    Custom attribute applies to a method parameter.

  • Property
    Custom attribute applies to a property.

  • RuntimeClass
    Custom attribute applies to a runtime class.

  • Struct
    Custom attribute applies to a struct.

  • InterfaceImpl
    Custom attribute applies to an interface implementation.

Remarks

Use the AttributeTargets enumeration in the attributeusage attribute to declare target Windows Runtime types for a custom IDL attribute.

Requirements

Minimum supported client

Windows 8 Consumer Preview

Minimum supported server

Windows Server 8 Beta

 

 

Build date: 3/7/2012