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.
Declaration
public static bool TryConstruct(this IAttribute attribute, ScopedDiagnosticSink diagnosticSink, out Attribute? constructedAttribute)Parameters
| Type | Name | Description |
|---|---|---|
| IAttribute | attribute | The attribute to construct. |
| ScopedDiagnosticSink | diagnosticSink | A sink for reporting diagnostics during construction. |
| Attribute | constructedAttribute | When this method returns |
Returns
| Type | Description |
|---|---|
| bool |
|
TryConstruct(IAttribute, 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.
Declaration
public static bool TryConstruct(this IAttribute attribute, out Attribute? constructedAttribute)Parameters
| Type | Name | Description |
|---|---|---|
| IAttribute | attribute | The attribute to construct. |
| Attribute | constructedAttribute | When this method returns |
Returns
| Type | Description |
|---|---|
| bool |
|