s&box docs

public class Sandbox.CodeGeneratorAttribute : System.Attribute

An attribute that can be added to a custom `System.Attribute` class for special code generation behavior. They'll then be applied to methods and properties when they are decorated with that attribute.

Constructors

Showing 1 constructors

public CodeGeneratorAttribute(Sandbox.CodeGeneratorFlags type, string callbackName, int priority = 0)

Perform code generation for a method or property.

Parameters

  • 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` and `Sandbox.CodeGeneratorFlags.Static` flags.
  • 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: Attributes with a higher priority will wrap the target first. The default priority is 0. Default: 0

Properties

Showing 3 properties

public string Sandbox.CodeGeneratorAttribute.CallbackName { get; set; }

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.

public int Sandbox.CodeGeneratorAttribute.Priority { get; set; }

Attributes with a higher priority will wrap the target first. The default priority is 0.

public Sandbox.CodeGeneratorFlags Sandbox.CodeGeneratorAttribute.Type { get; set; }

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` and `Sandbox.CodeGeneratorFlags.Static` flags.

Metadata

FieldValue
NamespaceSandbox
Typeclass
AssemblySandbox.System
Doc IDT:Sandbox.CodeGeneratorAttribute

On this page