Click or drag to resize
ServiceResolver Class
Class to resolve the macros in the context of WCF service (REST for example). Handles querystring and cookies macros in a WCS service specific way.
Inheritance Hierarchy

Namespace: CMS.WebServices
Assembly: CMS.WebServices (in CMS.WebServices.dll) Version: 8.2.23
Syntax
C#
public class ServiceResolver : MacroResolver

The ServiceResolver type exposes the following members.

Constructors
  NameDescription
Public methodServiceResolver
Creates new instance of ServiceResolver.
Top
Methods
  NameDescription
Public methodAddAnonymousSourceData
Adds new anonymous data source of general type to the resolver.
(Inherited from MacroResolver.)
Public methodAddSourceAlias
Adds alternative source expression.
(Inherited from MacroResolver.)
Public methodClone
Clones the resolver object.
(Inherited from MacroResolver.)
Public methodCreateChild
Creates the child resolver that loads the data from the parent resolver by default.
(Inherited from MacroResolver.)
Protected methodFinalizeResult
Finalizes the result (makes the result string).
(Inherited from MacroResolver.)
Public methodGetAnonymousSources
Returns list of all aggregated anonymous sources (from the whole resolver hierarchy).
(Inherited from MacroResolver.)
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)
(Inherited from MacroResolver.)
Public methodGetNamedSourceData
Gets the named source data by the given selector.
(Inherited from MacroResolver.)
Public methodGetObjectValue(Object, Int32, EvaluationContext)
Gets the object value at given index (this is called when indexer [(int)] is used in the expression).
(Inherited from MacroResolver.)
Public methodGetObjectValue(Object, String, EvaluationContext)
Gets the object value of specified name.
(Inherited from MacroResolver.)
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).
(Inherited from MacroResolver.)
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).
(Inherited from MacroResolver.)
Public methodGetSourceAlias
Gets the named source data by the given selector.
(Inherited from MacroResolver.)
Public methodCheckDataSources
Checks all the data sources for the value (at first, it checks if it's not special value).
(Overrides MacroResolverCheckDataSources(String, EvaluationContext).)
Public methodCheckObjectPermissions
Checks whether given user has Read permissions for given object type.
(Inherited from MacroResolver.)
Public methodIsDataItemAvailable
Checks all the data sources for the value and returns true if the data item is registered.
(Inherited from MacroResolver.)
Public methodNamedSourceDataExists
Returns true if given source data is known (can be null, but the property has to be registered).
(Inherited from MacroResolver.)
Protected methodPostProcessResult
If the object is InfoObject, returns its DisplayName column (if exists).
(Inherited from MacroResolver.)
Public methodPrioritizeProperty
Prioritizes a property (equivalent to using SetNamedSourceData with last parameter true).
(Inherited from MacroResolver.)
Public methodRegisterNamespace
Registers a namespace within this macro resolver
(Inherited from MacroResolver.)
Public methodResolveCustomMacro
Resolves the custom macro.
(Inherited from MacroResolver.)
Public methodResolveMacroExpression(ResolveExpressionSettings)
Resolves the data macro expression (expects expression without {% %} brackets).
(Inherited from MacroResolver.)
Public methodResolveMacroExpression(String, Boolean, Boolean, String)
Resolves the data macro expression (expects expression without {% %} brackets).
(Inherited from MacroResolver.)
Public methodResolveMacros(String, EvaluationContext)
Resolves the macros.
(Inherited from MacroResolver.)
Public methodResolveMacros(String, MacroSettings)
Resolves all supported macro types in the given text within specified resolving context.
(Inherited from MacroResolver.)
Public methodResolvePath
Resolves the path macro.
(Inherited from MacroResolver.)
Public methodSetAnonymousSourceData
Sets specified data source (without name) of general type to the resolver. Replaces all the existing anonymous sources.
(Inherited from MacroResolver.)
Public methodSetHiddenNamedSourceData(String, FuncEvaluationContext, Object)
Registers the named source data with late binding. Callback is called whenever the value is needed by MacroResolver.
(Inherited from MacroResolver.)
Public methodSetHiddenNamedSourceData(String, Object)
Registers the named source data with late binding. Callback is called whenever the value is needed by MacroResolver.
(Inherited from MacroResolver.)
Public methodSetNamedObjectSourceData Obsolete.
Registers the named object source data. Nice name of the object is used as a selector. It's an abbreviation of calling SetNamedSourceData(infoObj.Generalized.GetNiceName(), infoObj).
(Inherited from MacroResolver.)
Public methodSetNamedSourceData(Hashtable)
Sets hashtable data source to the resolver. Keys of the table are considered names of the data.
(Inherited from MacroResolver.)
Public methodSetNamedSourceData(Object, Boolean)
Sets given name-value pairs to the resolver.
(Inherited from MacroResolver.)
Public methodSetNamedSourceData(MacroField, Boolean)
Registers given field as the named source data.
(Inherited from MacroResolver.)
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.
(Inherited from MacroResolver.)
Public methodSetNamedSourceDataCallback
Registers the named source data with late binding. Callback is called whenever the value is needed by MacroResolver.
(Inherited from MacroResolver.)
Public methodSetNamedSourceDataInternal
Registers the named source data. The data can be accessed with macro {%Selector.ColumnName%}. Selector has to be in identifier format.
(Inherited from MacroResolver.)
Public methodSkippedResolver
Returns true if the macro processing skipped particular resolver name
(Inherited from MacroResolver.)
Top
Extension Methods
  NameDescription
Public Extension MethodAsValue
Converts object to a query value which can be used as a query parameter
(Defined by QueryExtensions.)
Public Extension MethodGetAPIString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodGetString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodToBoolean
Returns the boolean representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDateTime
Returns the DateTime representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDouble
Returns the double representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToGuid
Returns the Guid representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToInteger
Returns the integer representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToString
Returns the string representation of an object or default value if not.
(Defined by CoreExtensions.)
Top
Fields
  NameDescription
Protected fieldmActiveMacros
Current stack of active macros (macros that are just being resolved).
(Inherited from MacroResolver.)
Protected fieldmCurrentRecursion
Recursion handling.
(Inherited from MacroResolver.)
Protected fieldmParentResolver
Parent resolver is used to look for the data if it's not explicitly defined in current resolver All the data available in the parent are available also in children (could be overriden, though)
(Inherited from MacroResolver.)
Protected fieldmResolverName
Macro resolver name.
(Inherited from MacroResolver.)
Protected fieldmSettings
Macro context.
(Inherited from MacroResolver.)
Protected fieldmSkippedResolvers
Returns the list of resolvers that were skipped during the processing of the macros with this resolver.
(Inherited from MacroResolver.)
Top
Properties
  NameDescription
Public propertyCulture
Culture for the resolving
(Inherited from MacroResolver.)
Public propertyResolverName
Name of the resolver.
(Inherited from MacroResolver.)
Public propertySettings
Macro context (settings)
(Inherited from MacroResolver.)
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.
(Inherited from MacroResolver.)
Public propertySourceObject
Object with source data - To pass parameters to Custom macro function.
(Inherited from MacroResolver.)
Top
Events
  NameDescription
Public eventOnGetValue
Gets value event.
(Inherited from MacroResolver.)
Top
See Also