Table of Contents

Class RulesUtility

Namespace
Dynamicweb.Modules.Searching.Rules
Assembly
Dynamicweb.dll
Provides methods and properties for working with smart filter rules. This class cannot be inherited.
public sealed class RulesUtility
Inheritance
RulesUtility
Inherited Members

Fields

ValueSeparator

Gets or sets the value separator.
public const char ValueSeparator = ','

Field Value

char

Methods

GetXmlAttributeValue(XmlAttributeCollection, string)

Get the xml attribute value by attribute name
public static string GetXmlAttributeValue(XmlAttributeCollection attributes, string name)

Parameters

attributes XmlAttributeCollection
Attributes collection
name string
Attribute name

Returns

string

Matches(string, Rule)

Determines whether the given test value matches the given rule.
public static bool Matches(string testValue, Rule rule)

Parameters

testValue string
Test value.
rule Rule
Smart filter rule.

Returns

bool
Value indicating whether the given test value matches the given recognition rule constraint.

Matches(string, Rule, bool)

Determines whether the given test value matches the given rule.
public static bool Matches(string testValue, Rule rule, bool decomposeValue)

Parameters

testValue string
Test value.
rule Rule
Recognition rule.
decomposeValue bool
Value indicating whether to decompose both test value and constraint value (using ValueSeparator) and compere their components instead.

Returns

bool
Value indicating whether the given test value matches the given recognition rule constraint.

ParseRules(string)

Parses the recognition expression from the given XML representation.
public static RulesGroupCollection ParseRules(string xmlData)

Parameters

xmlData string
XML string representing an expression.

Returns

RulesGroupCollection
Parsed expression.
To top