The entry point for the meta model, which can be used in templates to inspect the target code or access other features of the template language.
Namespace: Metalama.Framework.Aspects
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public static class metaProperties
| Name | Description |
|---|---|
| AspectInstance | Gets the current IAspectInstance, which gives access to the Predecessors and the SecondaryInstances of the current aspect. |
| Base | Gets a |
| BaseType | Gets a |
| Tags | Gets the dictionary of tags that were passed to the IAdviceFactory method by the BuildAspect(IAspectBuilder<T>) method. |
| Target | Gets access to the declaration being overridden or introduced. |
| This | Gets a |
| ThisType | Gets a |
Methods
| Name | Description |
|---|---|
| Cast(IType, dynamic?) | Generates the cast syntax for the specified type. |
| CompileTime<T>(T?) | Coerces an |
| DebugBreak() | Requests the debugger to break, if any debugger is attached to the current process. |
| Default(IType) | Generates the |
| Default(SpecialType) | Generates the |
| Default(Type) | Generates the |
| DefineLocalVariable(string, IExpression) | |
| DefineLocalVariable(string, IType) | |
| DefineLocalVariable(string, IType, IExpression?) | |
| DefineLocalVariable(string, IType, dynamic) | |
| DefineLocalVariable(string, dynamic) | |
| DefineLocalVariable(string, Type) | |
| DefineLocalVariable(string, Type, IExpression?) | |
| DefineLocalVariable(string, Type, dynamic) | |
| InsertComment(params string?[]) | Injects a comment to the target code. |
| InsertStatement(IExpression) | Inserts a statement into the target code, where the statement is given as an IExpression. Note that not all expressions can be used as statements. |
| InsertStatement(IStatement) | Inserts a statement into the target code, where the statement is given as an IStatement. |
| InsertStatement(string) | Inserts a statement into the target code, where the statement is given as a string. Calling this overload is equivalent to calling the InsertStatement(IStatement) overload with the result of the Parse(string) method. |
| InvokeTemplate(TemplateInvocation, object?) | Calls another template method. |
| InvokeTemplate(string, ITemplateProvider?, object?) | Calls another template method. This overload accepts an ITemplateProvider. |
| InvokeTemplate(string, TemplateProvider, object?) | Calls another template method. This overload accepts a TemplateProvider. |
| Proceed() | Invokes the logic that has been overwritten. For instance, in an OverrideMethodAspect, calling Proceed() invokes the method being overridden. Note that the way how the logic is invoked (as a method call or inlining) is considered an implementation detail. |
| ProceedAsync() | Synonym to Proceed(), but the return type is exposed as a |
| ProceedAsyncEnumerable() | |
| ProceedAsyncEnumerator() | |
| ProceedEnumerable() | Synonym to Proceed(), but the return type is exposed as a |
| ProceedEnumerator() | Synonym to Proceed(), but the return type is exposed as a |
| Return() | Inserts a |
| Return(dynamic?) | Inserts a |
| RunTime<T>(T?) | Converts a compile-value into run-time value by serializing the compile-time value into a some syntax that will evaluate, at run time, to the same value as at compile time. |