Skip to content

Class ValueMatcher

Namespace: OfficeOpenXml.FormulaParsing.ExcelUtilities
Assembly: EPPlus.dll

Compares and matches values

public class ValueMatcher

Inheritance

object ← ValueMatcher

Derived

LookupValueMatcher
WildCardValueMatcher

Inherited Members

object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()

Constructors

ValueMatcher()

public ValueMatcher()

Fields

IncompatibleOperands

Value to represent incompatible operands

public const int IncompatibleOperands = -2

Field Value

int

Methods

CompareObjectToString(object, string)

Compares object to string candidate.

protected virtual int CompareObjectToString(object searchedValue, string candidate)

Parameters

searchedValue object

candidate string

Returns

int

CompareStringToObject(string, object, bool)

Compares string to object candidate

protected virtual int CompareStringToObject(string searchedValue, object candidate, bool convertNumericString = true)

Parameters

searchedValue string

candidate object

convertNumericString bool

Returns

int

CompareStringToString(string, string)

Compares strings

protected virtual int CompareStringToString(string searchedValue, string candidate)

Parameters

searchedValue string

candidate string

Returns

int

IsMatch(object, object, bool)

Compares objects of different types using appropriate CompareTo methods

public virtual int IsMatch(object searchedValue, object candidate, bool convertNumericString = true)

Parameters

searchedValue object

original value

candidate object

potential match

convertNumericString bool

If true a numeric string will be convered to a number in the comparison. Default value is true.

Returns

int