Class MacroExpander
Implementation of IExpandsMacro which first extends the macro and then fills its slots.
Inheritance
System.Object
MacroExpander
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ZptSharp.Metal
Assembly: ZptSharp.dll
Syntax
public class MacroExpander : IExpandsMacro
Constructors
| Improve this Doc View SourceMacroExpander(IGetsMacro, IGetsMetalAttributeSpecs, IGetsSlots, IFillsSlots, ILogger<MacroExpander>)
Initializes a new instance of the MacroExpander class.
Declaration
public MacroExpander(IGetsMacro macroProvider, IGetsMetalAttributeSpecs specProvider, IGetsSlots slotFinder, IFillsSlots slotFiller, ILogger<MacroExpander> logger)
Parameters
Type | Name | Description |
---|---|---|
IGetsMacro | macroProvider | Macro provider. |
IGetsMetalAttributeSpecs | specProvider | Spec provider. |
IGetsSlots | slotFinder | Slot finder. |
IFillsSlots | slotFiller | Slot filler. |
Microsoft.Extensions.Logging.ILogger<MacroExpander> | logger | A logger. |
Methods
| Improve this Doc View SourceExpandMacroAsync(MetalMacro, ExpressionContext, CancellationToken)
Expands the specified macro and returns the result.
Declaration
public Task<MetalMacro> ExpandMacroAsync(MetalMacro macro, ExpressionContext context, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
MetalMacro | macro | The macro to expand. |
ExpressionContext | context | The current expression context. |
System.Threading.CancellationToken | token | An optional cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<MetalMacro> | The expanded macro. |