Show / Hide Table of Contents

Class MacroParameterResolver

An XmlHelper.IParameterResolver that parses and evaluates configuration macros in the format of

{user-defined-name [default-value]}
.

Inheritance
object
MacroParameterResolver
DefaultConfigurableCacheFactory.ClassSchemeParameterResolver
Implements
XmlHelper.IParameterResolver
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Tangosol.Util
Assembly: Coherence.dll
Syntax
public class MacroParameterResolver : XmlHelper.IParameterResolver
Remarks

If the

user-defined-name
is a key within the IDictionary provided at construction, then the resolved value will be the value from the dictionary. If there is no value, then the default, if any, will be returned.

Constructors

MacroParameterResolver(IDictionary)

Create a new MacroParameterResolver with a set of values to used in parameter replacement.

Declaration
public MacroParameterResolver(IDictionary attributes)
Parameters
Type Name Description
IDictionary attributes

key/values for macro parameter replacement

Fields

m_attributes

Declaration
protected readonly IDictionary m_attributes
Field Value
Type Description
IDictionary

Methods

ResolveParameter(string, string)

Attempt to resolve the provided macro in the format of

{user-defined-name [default-value]}
against the attributes provided at construction time.

Declaration
public virtual object ResolveParameter(string type, string value)
Parameters
Type Name Description
string type

parameter type

string value

the raw marco

Returns
Type Description
object

the resolved value converted to the appropriate type

Exceptions
Type Condition
ArgumentException

If the provided macro value is in the incorrect format.

ArgumentException

The parameter cannot be resolved against the attributes provided at construction time and the macro does not include a default

ArgumentNullException

If

type
or
value
is
null

Implements

XmlHelper.IParameterResolver
In this article
Back to top Copyright © 2000, 2024, Oracle and/or its affiliates.