Interface IGetsMacro
An object which gets a METAL macro for an node which has a matching METAL attribute.
Namespace: ZptSharp.Metal
Assembly: ZptSharp.Abstractions.dll
Syntax
public interface IGetsMacro
Methods
| Improve this Doc View SourceGetMacroAsync(INode, ExpressionContext, IEnumerable<AttributeSpec>, CancellationToken)
Gets the METAL macro referenced by the specified node's attribute, if such an attribute is present.
Declaration
Task<MetalMacro> GetMacroAsync(INode node, ExpressionContext context, IEnumerable<AttributeSpec> attributeSpecs, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
INode | node | The node from which to get the macro. |
ExpressionContext | context | The current expression context. |
System.Collections.Generic.IEnumerable<AttributeSpec> | attributeSpecs | A collection of attribute specs. |
System.Threading.CancellationToken | token | An optional cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<MetalMacro> | The METAL macro, or a null reference if the |
Exceptions
Type | Condition |
---|---|
MacroNotFoundException | If the node does have an attribute matching
the |
GetMacroAsync(INode, ExpressionContext, AttributeSpec, CancellationToken)
Gets the METAL macro referenced by the specified node's attribute, if such an attribute is present.
Declaration
Task<MetalMacro> GetMacroAsync(INode node, ExpressionContext context, AttributeSpec attributeSpec, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
INode | node | The node from which to get the macro. |
ExpressionContext | context | The current expression context. |
AttributeSpec | attributeSpec | An attribute spec. |
System.Threading.CancellationToken | token | An optional cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<MetalMacro> | The METAL macro, or a null reference if the |
Exceptions
Type | Condition |
---|---|
MacroNotFoundException | If the node does have an attribute matching
the |