Open sandboxFocus

Class CompileTimeAttribute

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.

Inheritance
CompileTimeAttribute
Namespace: Metalama.Framework.Aspects
Assembly: Metalama.Framework.dll
Syntax
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Enum|AttributeTargets.Constructor|AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Event|AttributeTargets.Interface|AttributeTargets.Parameter|AttributeTargets.Delegate|AttributeTargets.ReturnValue|AttributeTargets.GenericParameter)]
public sealed class CompileTimeAttribute : ScopeAttribute

Constructors

Name Description
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.

Properties

Name Description
IsTemplateOnly

Gets a value indicating whether the target declaration can only be used from templates, but not from other compile-time code.

Reason