Click or drag to resize
MacroResolver Class
Class to resolve the macros, provides data to the resolving process.
Inheritance Hierarchy
SystemObject
  CMS.MacroEngineMacroResolver

Namespace: CMS.MacroEngine
Assembly: CMS.MacroEngine (in CMS.MacroEngine.dll) Version: 12.0.0
Syntax
C#
public class MacroResolver : IMacroResolver, 
	INotCopyThreadItem

The MacroResolver type exposes the following members.

Constructors
  NameDescription
Public methodMacroResolver Obsolete.
Constructor
Top
Fields
  NameDescription
Public fieldStatic memberUNRESOLVED_RETURN_VALUE
Represents unresolved keyword.
Top
Properties
  NameDescription
Public propertyCulture
Culture for the resolving
Public propertyCode exampleResolverName
Resolver name used for context specific resolving.
Public propertySettings
Macro resolver settings.
Public propertyShowOnlyPrioritized
If true, only prioritized properties are shown in Macro components (IntelliSense, MacroSelector, ...). Influences only visual part of the components, resolver will still be able to resolve all the others as well.
Public propertySourceObject
Object with source data - To pass parameters to Custom macro function.
Top
Methods
  NameDescription
Public methodAddAnonymousSourceData
Adds new anonymous data source of general type to the resolver.
Public methodAddSourceAlias
Adds alternative source expression.
Public methodCheckDataSources
Checks all the data sources for the value. Returns true if given data member was found within supported data sources.
Public methodCheckObjectPermissions
Checks whether given identity option has Read permissions for given object type.
Public methodCreateChild
Creates new instance of MacroResolver as a child resolver that loads the data from the parent resolver by default.
Public methodStatic memberEncapsulateObject
Encapsulates object if needed (DataSet, DataRow, DataTable to their Container equivalent).
Protected methodFinalizeResult
Finalizes the result (makes the result string).
Public methodGetAnonymousSources
Returns list of all aggregated anonymous sources (from the whole resolver hierarchy).
Public methodGetHiddenRegisteredDataNames
Returns set of registered hidden named data sources (including all hidden named data sources registered in the parent(s) of the resolver, it's an union of keys through the whole hierarchy). Includes only hidden sources (which are tracked only in DevelopmentMode)
Public methodStatic memberGetInstance
Creates new instance of MacroResolver.
Public methodGetNamedSourceData
Gets the named source data by the given selector.
Public methodGetObjectValue(Object, Int32, EvaluationContext)
Gets the object value at given index (this is called when indexer [(int)] is used in the expression).
Public methodGetObjectValue(Object, String, EvaluationContext)
Gets the object value of specified name.
Public methodGetPrioritizedDataNames
Returns set of prioritized named data sources (including all prioritized named data sources registered in the parent(s) of the resolver, it's an union of keys through the whole hierarchy). DOES NOT include non-prioritized keys (call GetRegisteredDataNames to get those).
Public methodGetRegisteredDataNames
Returns set of registered named data sources (including all named data sources registered in the parent(s) of the resolver, it's an union of keys through the whole hierarchy). DOES NOT include prioritized keys (call GetPrioritizedDataNames to get those).
Public methodGetSourceAlias
Gets the named source data by the given selector.
Public methodIsDataItemAvailable
Checks all the data sources for the value and returns true if the data item is registered.
Public methodNamedSourceDataExists
Returns true if given source data is known (can be null, but the property has to be registered).
Protected methodPostProcessResult
If the object is InfoObject, returns its DisplayName column (if exists).
Public methodPrioritizeProperty
Prioritizes a property (equivalent to using SetNamedSourceData with last parameter true).
Public methodRegisterNamespace
Registers a namespace within this macro resolver
Public methodStatic memberRegisterObjectValueByIndexHandler
Registers GetObjectValueByName handler(s) to extend possibilities of MacroEngine to dig values from particular object types. These handlers are internally used when a property is requested out of a given object. First the default object types are checked, then all the handlers (the order of the handler evaluation is not guaranteed).
Public methodStatic memberRegisterObjectValueByNameHandler
Registers GetObjectValueByName handler(s) to extend possibilities of MacroEngine to dig values from particular object types. These handlers are internally used when a property is requested out of a given object. First the default object types are checked, then all the handlers (the order of the handler evaluation is not guaranteed).
Public methodStatic memberResolve
Resolves the context macros.
Public methodStatic memberResolveCurrentPath
Resolves the given alias path, applies the path segment to the given format string {0} for level 0.
Public methodResolveCustomMacro
Resolves the custom macro.
Public methodResolveMacroExpression(ResolveExpressionSettings)
Resolves the data macro expression (expects expression without {% %} brackets).
Public methodResolveMacroExpression(String, Boolean, Boolean, String)
Resolves the data macro expression (expects expression without {% %} brackets). Use RemoveDataMacroBrackets(String) method to remove brackets if needed.
Public methodResolveMacros(String, EvaluationContext)
Resolves the macros.
Public methodResolveMacros(String, MacroSettings)
Resolves all supported macro types in the given text within specified resolving context.
Public methodResolvePath
Resolves the path macro.
Public methodSetAnonymousSourceData
Sets (replaces all existing anonymous sources) specified data source (without name) of general type to the resolver.
Public methodSetHiddenNamedSourceData(String, FuncEvaluationContext, Object)
Registers the named source data with late binding. Callback is called whenever the value is needed by MacroResolver.
Public methodSetHiddenNamedSourceData(String, Object)
Registers the named source data with late binding. Callback is called whenever the value is needed by MacroResolver.
Public methodSetNamedSourceData(Hashtable)
Sets hashtable data source to the resolver. Keys of the table are considered names of the data.
Public methodSetNamedSourceData(IDictionaryString, Object, Boolean)
Sets given name-value pairs to the resolver.
Public methodSetNamedSourceData(MacroField, Boolean)
Registers given field as the named source data.
Public methodSetNamedSourceData(String, Object, Boolean)
Registers the named source data. The data can be accessed with macro {%Selector.ColumnName%}. Selector has to be in identifier format.
Public methodSetNamedSourceDataCallback
Registers the named source data with late binding. Callback is called whenever the value is needed by MacroResolver.
Public methodSkippedResolver
Returns true if the macro processing skipped particular resolver name
Top
Events
  NameDescription
Public eventOnGetValue
Gets value event.
Public eventStatic memberOnResolveCustomMacro
Custom macro event.
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also