Пример #1
0
        /// <summary>
        /// Deep compare
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            if (obj.GetType() != typeof(ModAction))
            {
                return(false);
            }
            ModAction ma = (ModAction)obj;

            if (!Type.Equals(ma.Type))
            {
                return(false);
            }
            if (!Body.Equals(ma.Body))
            {
                return(false);
            }
            if (!AfterComment.Equals(ma.AfterComment))
            {
                return(false);
            }
            if (!BeforeComment.Equals(ma.BeforeComment))
            {
                return(false);
            }
            if (!(Modifier == null && ma.Modifier == null))
            {
                if (!Modifier.Equals(ma.Modifier))
                {
                    return(false);
                }
            }
            // ignore start line
            return(true);
        }
Пример #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="action"></param>
 /// <returns></returns>
 public int IndexOf(ModAction action)
 {
     return(actions.IndexOf(action));
 }
Пример #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="o"></param>
 public void Remove(ModAction o)
 {
     actions.Remove(o);
 }
Пример #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="BeforeAction"></param>
 /// <param name="newaction"></param>
 /// <returns></returns>
 public void Insert(int BeforeAction, ModAction newaction)
 {
     actions.Insert(BeforeAction, newaction);
 }
Пример #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="newaction"></param>
 public int Add(ModAction newaction)
 {
     return(actions.Add(newaction));
 }
Пример #6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="action"></param>
 /// <returns></returns>
 public bool Contains(ModAction action)
 {
     return(actions.Contains(action));
 }