/// <summary> /// Clones all child conditions of this instance to the given instance. /// </summary> /// <param name="htCondition">The condition to clone all childs to.</param> protected void CloneChildsTo(HTTPStreamModifierCondition htCondition) { foreach (HTTPStreamModifierCondition htChild in this.ChildRules) { htCondition.AddChildRule((HTTPStreamModifierCondition)htChild.Clone()); } }
/// <summary> /// Checks whether a given child condition is contained by this condition. /// </summary> /// <param name="cChild">The child to check for.</param> /// <returns>A bool indicating whether a given child condition is contained by this condition.</returns> public bool ContainsChildCondition(HTTPStreamModifierCondition cChild) { lock (lChildRules) { return(lChildRules.Contains(cChild)); } }
/// <summary> /// Removes the given child condition. /// </summary> /// <param name="cChild">The child to remove</param> public void RemoveChildRule(HTTPStreamModifierCondition cChild) { lock (lChildRules) { lChildRules.Remove(cChild); } }
/// <summary> /// Adds a child condition to this condition. /// Child rules are validated and the result is and-conjuncted with the result of the parent rule. /// <br /> /// If there are multiple child rules, and the result of at least one child rule is true, and the result of this rule is true, the end result is true.<br /> /// If there are multiple child rules, and the result of all child rules is false, the end result is flase.<br /> /// If the result of this rule is false, the end result is false.<br /> /// </summary> /// <param name="cChild"></param> public void AddChildRule(HTTPStreamModifierCondition cChild) { lock (lChildRules) { lChildRules.Add(cChild); } }