Data returned from IMacroContext.AllKnownMacros
More...
Source file:
|
Symbol | Namespace [get] |
|
LexicalMacro | Macro [get] |
|
string | Syntax [get, protected set] |
|
string | Description [get, protected set] |
|
string[] | Names [get] |
|
MacroMode | Mode [get, set] |
|
MacroMode | Priority [get] |
|
|
static IEnumerable< MacroInfo > | GetMacros (Type type, IMessageSink errorSink=null, Symbol @namespace=null, object instance=null) |
| Uses reflection to find a list of macros within the specified type by searching for (static) methods that (1) are marked with LexicalMacroAttribute and (2) take no parameters and return a list (IEnumerable) of MacroInfo. Such methods are called to get macros. More...
|
|
◆ GetMacros()
static IEnumerable<MacroInfo> LeMP.MacroInfo.GetMacros |
( |
Type |
type, |
|
|
IMessageSink |
errorSink = null , |
|
|
Symbol @ |
namespace = null , |
|
|
object |
instance = null |
|
) |
| |
|
inlinestatic |
Uses reflection to find a list of macros within the specified type by searching for (static) methods that (1) are marked with LexicalMacroAttribute and (2) take no parameters and return a list (IEnumerable) of MacroInfo. Such methods are called to get macros.
- Parameters
-
type | The type to search for macros. |
namespace | Optionally overrides the namespace associated with macros marked with LexicalMacroAttribute. Does not affect macros returned in a list of MacroInfo. |
errorSink | An object in which to send error messages (Severity.Warning is used because unavailability of a macro should not appear as an error when compiling something with LeMP.) |
instance | An optional object of the same type as type , which will be used to bind instance methods. If this is null, only static methods are discovered. |
- Returns
References LeMP.LexicalMacro().