s&
About
The Project
infoAbout s&box mapRoadmap monitoringMetricsEngine startup and usage numbers
Updates
newspaperLatest News
jams
Workshop
Steam
open_in_newSteam Workshop
Assets
view_in_arModels textureMaterials apparelClothing
Forum
Learn
Documentation
rocket_launchGetting Started docsDocumentation apiAPI Reference
Resources
schoolTutorials manage_searchCode Search
Get s&box
Sign in with Steam
Api
Attributes
CodeGeneratorAttribute
chevron_left Attributes
attribute
CodeGeneratorAttribute

Constructors

functionsCodeGeneratorAttribute

Properties

data_objectCallbackNamedata_objectPrioritydata_objectType
CodeGeneratorAttribute
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 <i>that</i> attribute.
attribute Sandbox .
Sandbox.System

build Constructors 1

CodeGeneratorAttribute (type, callbackName, priority)
Perform code generation for a method or property.

data_object Properties 3

CallbackName
string
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
int
Attributes with a higher priority will wrap the target first. The default priority is 0.
Type
CodeGeneratorFlags
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.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.
Facepunch
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter