Allows to complete the construction of a declaration that has been created by an advice.
Namespace: Metalama.Framework.Code.DeclarationBuilders
Assembly: Metalama.Framework.dll
Syntax
public interface IDeclarationBuilder : IDeclaration, IDisplayable, IDiagnosticLocation, ICompilationElement, IMeasurable, IEquatable<IDeclaration>Properties
| Name | Description |
|---|---|
| IsFrozen | Gets a value indicating whether the builder has been frozen. When the value is |
Methods
| Name | Description |
|---|---|
| AddAttribute(AttributeConstruction) | Adds a custom attribute to the current declaration. |
| AddAttributes(IEnumerable<AttributeConstruction>) | Adds custom attributes to the current declaration. |
| AddAttributes(IEnumerable<IAttribute>) | Adds custom attributes to the current declaration by copying them from existing IAttribute instances.
This is useful when replacing or introducing a declaration and copying the attributes from the original declaration.
Callers can filter the sequence (e.g. using LINQ |
| Freeze() | Freezes the declaration so that modifications can no longer be performed. |
| RemoveAttributes(INamedType) | Removes all custom attributes of a given type from the current declaration. |