MetalamaAPI documentationAspect APIMetalama.​Framework.​CodeAttribute­Extensions
Open sandboxFocus

Class AttributeExtensions

Extension methods for the IAttribute interface.

Inheritance
System.Object
AttributeExtensions
Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public static class AttributeExtensions : Object

Methods

Name Description
ToAttributeConstruction(IAttribute)

Converts an IAttribute to an AttributeConstruction object.

TryConstruct(IAttribute, ScopedDiagnosticSink, out Attribute)

Tries to construct an instance of the attribute represented by the current IAttribute. The attribute type must not be a run-time-only type.

TryGetNamedArgument(IAttribute, String, out TypedConstant)

Tries to get a named argument (i.e. the value assigned to a field or property).