Open sandboxFocus

Constructor CompileTimeAttribute

CompileTimeAttribute(bool, string?)

Attribute that means that the target declaration (and all children declarations) can only be called from compile-time code and, therefore, not from run-time code. See RunTimeOrCompileTimeAttribute for declarations that can be called both from compile-time and run-time code.

Declaration
public CompileTimeAttribute(bool isTemplateOnly, string? reason = null)
Parameters
Type Name Description
bool isTemplateOnly

Indicates whether the target declaration can only be used from templates, but not from other compile-time code.

string reason

CompileTimeAttribute()

Declaration
public CompileTimeAttribute()