# Sandbox.CodeGeneratorAttribute

An attribute that can be added to a custom `T:System.Attribute` class for special code generation behavior.
They'll then be applied to methods and properties when they are decorated with that attribute.

- Kind: attribute
- Namespace: `Sandbox`
- Assembly: `Sandbox.System`

## Constructors

- [`CodeGeneratorAttribute`](/api/Sandbox.CodeGeneratorAttribute/.ctor): Perform code generation for a method or property.

## Properties

- [`CallbackName`](/api/Sandbox.CodeGeneratorAttribute/CallbackName): The name of the callback method. This can be a fully qualified static method callback or a simple callback to invoke on the target object if the method or property target is not static.
- [`Priority`](/api/Sandbox.CodeGeneratorAttribute/Priority): Attributes with a higher priority will wrap the target first. The default priority is 0.
- [`Type`](/api/Sandbox.CodeGeneratorAttribute/Type): The type of code generation you want to do. You will need to specify whether it should apply to instance or static methods and properties using the [Sandbox.CodeGeneratorFlags.Instance](/api/Sandbox.CodeGeneratorFlags/Instance) and [Sandbox.CodeGeneratorFlags.Static](/api/Sandbox.CodeGeneratorFlags/Static) flags.
