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