Show / Hide Table of Contents

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 Source

GetMacroAsync(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 node has no attribute matching any of the attributeSpecs.

Exceptions
Type Condition
MacroNotFoundException

If the node does have an attribute matching the attributeSpecs but no macro could be resolved from the attribute's expression.

| Improve this Doc View Source

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 node has no attribute matching the attributeSpec.

Exceptions
Type Condition
MacroNotFoundException

If the node does have an attribute matching the attributeSpec but no macro could be resolved from the attribute's expression.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX