Class MacroResolverStorage
- Namespace
- CMS.MacroEngine
- Assembly
- CMS.MacroEngine.dll
Global storage of static resolvers for all modules. Extend this to store your module's resolver to be globally available (in e-mail templates, macro components, etc.)
public class MacroResolverStorage
- Inheritance
-
objectMacroResolverStorage
- Extension Methods
Methods
GetRegisteredResolver(string)
Returns resolver of given name. Returns default resolver if the name was not found.
public static MacroResolver GetRegisteredResolver(string name)
Parameters
name
stringName of the resolver
Returns
GetRegisteredResolvers()
Returns names of all registered resolvers.
public static List<string> GetRegisteredResolvers()
Returns
- List<string>
RegisterGetResolverHandler(params GetResolverHandler[])
Registers handler(s) called when resolver is being retrieved and was not found in the main storage.
public static void RegisterGetResolverHandler(params MacroResolverStorage.GetResolverHandler[] handlers)
Parameters
handlers
GetResolverHandler[]Handler(s) to be registered
RegisterResolver(string, Func<MacroResolver>)
Registers the macro resolver
public static void RegisterResolver(string name, Func<MacroResolver> lambda)
Parameters
name
stringResolver name
lambda
Func<MacroResolver>Lambda expression to initialize the resolver