public ConstraintParameters(bool enabled, EvaluationOrder order, int iterations) { this.enabled = enabled; this.iterations = iterations; this.evaluationOrder = order; this.SORFactor = 1; }
public static IEnumerable <ITreeNode> GetEnumerable(this ITreeNode node, EvaluationOrder evaluationOrder) { if (evaluationOrder == EvaluationOrder.ParentFirst) { yield return(node); } if (node.Outcome.Type == ResultType.Pass) { foreach (var child in node.Children) { var childEnumerator = child.GetEnumerable(evaluationOrder).GetEnumerator(); while (childEnumerator.MoveNext()) { yield return(childEnumerator.Current); } } } if (evaluationOrder == EvaluationOrder.ChildrenFirst) { yield return(node); } }
public IActionResult PostEvaluatuin(int providerID, int starScore, string content) { var entity = new EvaluationOrder() { ServiceProvider = _serviceProviderService.FindById(providerID), SysUser = _sysUserService.FindById(WebHelper.WebHelper.UserSession.ID), Content = content.Trim(), Star = starScore, EvaluationStart = DateTime.Now }; _evaluationOrderService.Insert(entity); return(Redirect("/ServiceProvider/ServiceProviderDetails?id=" + providerID)); }
/// <summary> /// Gets the enumerable list of rule in the required order. /// </summary> /// <param name="rule">The node.</param> /// <param name="evaluationOrder">The evaluation order.</param> /// <returns></returns> public static IEnumerable<IRule> GetEnumerable(this IRule rule, EvaluationOrder evaluationOrder) { if (evaluationOrder == EvaluationOrder.ParentFirst) { yield return rule; } foreach (var child in rule.Children) { var childEnumerator = child.GetEnumerable(evaluationOrder).GetEnumerator(); while (childEnumerator.MoveNext()) { yield return childEnumerator.Current; } } if (evaluationOrder == EvaluationOrder.ChildrenFirst) { yield return rule; } }
public static EvaluationOrderModel ToModel(this EvaluationOrder entity) { return(entity.MapTo <EvaluationOrder, EvaluationOrderModel>()); }
public static IEnumerable<ITreeNode> GetEnumerable(this ITreeNode node, EvaluationOrder evaluationOrder) { if (evaluationOrder == EvaluationOrder.ParentFirst) { yield return node; } if (node.Outcome.Type == ResultType.Pass) { foreach (var child in node.Children) { var childEnumerator = child.GetEnumerable(evaluationOrder).GetEnumerator(); while (childEnumerator.MoveNext()) { yield return childEnumerator.Current; } } } if (evaluationOrder == EvaluationOrder.ChildrenFirst) { yield return node; } }