/// <summary> /// Executes the specified rule context. /// </summary> /// <param name="ruleContext">The rule context.</param> /// <returns> /// Returns value indicating whether the specified property is true or not /// </returns> protected override bool Execute(T ruleContext) { Assert.ArgumentNotNull(ruleContext, "ruleContext"); return(DeviceResolverHelper.GetCompareProperty( Helper.GetPropertyName(this.Property), this.LowerLimit, this.UpperLimit)); }
/// <summary> /// Executes the specified rule context. /// </summary> /// <param name="ruleContext">The rule context.</param> /// <returns> /// Returns value indicating whether the specified property is true or not /// </returns> protected override bool Execute(T ruleContext) { Assert.ArgumentNotNull(ruleContext, "ruleContext"); return(DeviceResolverHelper.GetStringProperty( Helper.GetPropertyName(this.Property), Helper.GetValueName(this.Value), StringConditionOperator.Equals)); }
/// <summary> /// Executes the specified rule context. /// </summary> /// <param name="ruleContext">The rule context.</param> /// <returns> /// Returns value indicating whether the specified property is true or not /// </returns> protected override bool Execute(T ruleContext) { Assert.ArgumentNotNull(ruleContext, "ruleContext"); return(DeviceResolverHelper.GetDoubleProperty( Helper.GetPropertyName(this.Property), this.Value, base.GetOperator())); }
/// <summary> /// Executes the specified rule context. /// </summary> /// <param name="ruleContext">The rule context.</param> /// <returns>Returns value indicating whether specified Device property matches Value or not</returns> protected override bool Execute(T ruleContext) { Assert.ArgumentNotNull(ruleContext, "ruleContext"); string str = this.Value ?? string.Empty; var propertyValue = DeviceResolverHelper.GetStringProperty(this.Property); if (!string.IsNullOrEmpty(propertyValue)) { return(Compare(propertyValue, str)); } return(false); }
/// <summary> /// Executes the specified rule context. /// </summary> /// <param name="ruleContext">The rule context.</param> /// <returns> /// Returns value indicating whether the specified property is true or not /// </returns> protected override bool Execute(T ruleContext) { Assert.ArgumentNotNull(ruleContext, "ruleContext"); return(DeviceResolverHelper.GetBoolProperty( Helper.GetPropertyName(this.Property))); }
/// <summary> /// Checks to see if the difference is below the maximum allowed. /// </summary> /// <param name="ruleContext">The rule context.</param> /// <returns> /// Returns value indicating whether the result is valid. /// </returns> protected override bool Execute(T ruleContext) { Assert.ArgumentNotNull(ruleContext, "ruleContext"); return(DeviceResolverHelper.GetDifference( this.MaximumDifference)); }