コード例 #1
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()));
 }
コード例 #2
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()));
 }
コード例 #3
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()));
 }