Esempio n. 1
0
        /// <summary>
        /// Returns whether a condition with equal conditions already exists
        /// </summary>
        /// <param name="Condition">The condition to test</param>
        /// <returns>Whether the referenced condition is already listed</returns>
        public bool IsContained(TransformCondition Condition)
        {
            foreach (TransformCondition con in list)
            {
                if (con.TypeName != Condition.TypeName)
                {
                    continue;
                }
                if (con.ModuleName != Condition.ModuleName)
                {
                    continue;
                }
                if (con.FunctionName != Condition.FunctionName)
                {
                    continue;
                }
                if (con.Type != Condition.Type)
                {
                    continue;
                }

                return(true);
            }
            return(false);
        }
Esempio n. 2
0
 /// <summary>
 /// Adds a condition to the list, if there is no equivalent condition present.
 /// </summary>
 /// <param name="Condition">The condition to add</param>
 public void Add(TransformCondition Condition)
 {
     if (!IsContained(Condition))
     {
         list.Add(Condition);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Removes a condition from the lsit of conditional transforms
 /// </summary>
 /// <param name="Condition">The condition to remove</param>
 public void Remove(TransformCondition Condition)
 {
     list.Remove(Condition);
 }
Esempio n. 4
0
 /// <summary>
 /// Returns whether the actual object is part of the list
 /// </summary>
 /// <param name="Condition">The object to test for list membership</param>
 /// <returns>Whether the object is listed</returns>
 public bool IsListed(TransformCondition Condition)
 {
     return(list.IndexOf(Condition) >= 0);
 }