Пример #1
0
 /// <summary>
 /// Gets a value indicating if the specified ValueOperator is compatible with the specified AttributeType
 /// </summary>
 /// <param name="op">The ValueOperator to compare</param>
 /// <param name="type">The AttributeType to compare</param>
 /// <returns>True if the specified ValueOperator is usable with the specified AttributeType, otherwise false is returned</returns>
 public static bool IsAllowedOperator(ValueOperator op, AttributeType type)
 {
     return(ComparisonEngine.IsAllowedOperator(op, type.ToExtendedAttributeType()));
 }
Пример #2
0
 /// <summary>
 /// Compares two values of the specified AttributeType
 /// </summary>
 /// <param name="actualValue">The value to test</param>
 /// <param name="expectedValue">The expected value</param>
 /// <param name="valueOperator">The operator to use</param>
 /// <param name="type">The data type of the values to compare</param>
 /// <returns>True if the values are the same</returns>
 public static bool Compare(object actualValue, object expectedValue, ValueOperator valueOperator, AttributeType type)
 {
     return(ComparisonEngine.Compare(actualValue, expectedValue, valueOperator, type.ToExtendedAttributeType()));
 }
Пример #3
0
 /// <summary>
 /// Compares a string using the specified ValueOperator
 /// </summary>
 /// <param name="actualValue">The value obtained from the query</param>
 /// <param name="expectedValue">The expected value specified in the query logic</param>
 /// <param name="valueOperator">The value operator to use in the comparison</param>
 /// <returns>A boolean value indicating if the actual and expected value matched when using the specified ValueOperator</returns>
 public static bool CompareString(string actualValue, string expectedValue, ValueOperator valueOperator)
 {
     return(ComparisonEngine.CompareString(actualValue, expectedValue, valueOperator, StringComparison.CurrentCultureIgnoreCase));
 }
Пример #4
0
 /// <summary>
 /// Gets the value operators that are allowed to be used with the specified AttributeType
 /// </summary>
 /// <param name="type">The type of attribute to obtain the allowed operators for</param>
 /// <returns>An enumeration of ValueOperators</returns>
 public static IEnumerable <ValueOperator> GetAllowedValueOperators(AttributeType type)
 {
     return(ComparisonEngine.GetAllowedValueOperators(type.ToExtendedAttributeType()));
 }