Open sandboxFocus

Interface IAttributeData

Represent the members of a custom attribute, but not its relationship to the containing declaration.

Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public interface IAttributeData
Remarks

Values of ConstructorArguments and NamedArguments are represented as:

  • Primitive types as themselves (e.g. int as int, string as string).
  • Enums as their underlying type.
  • Type as IType.
  • Arrays as IReadOnlyList<object>.

Properties

Name Description
Constructor

Gets the constructor to be used to instantiate the custom attribute.

ConstructorArguments

Gets the parameters passed to the Constructor.

NamedArguments

Gets the named arguments (either fields or properties) of the attribute.

Type

Gets the custom attribute type.

Extension Methods