Пример #1
0
 public bool Equals(TSCQueue a)
 {
     if ((object)a == null)
     {
         return(false);
     }
     return(FieldsEqual(this, a));
 }
Пример #2
0
 public bool KeyEquals(TSCQueue a)
 {
     if ((object)a == null)
     {
         return(false);
     }
     return(
         (a.EventKey.Trim().ToLower() == EventKey.Trim().ToLower()) &&
         (a.QueueRound == QueueRound) &&
         (a.SingerKey.Trim().ToLower() == SingerKey.Trim().ToLower())
         );
 }
Пример #3
0
 public TSCQueue(TSCQueue tscqueue)
     : this()
 {
     EventKey    = new string(tscqueue.EventKey.ToArray());
     SingerKey   = new string(tscqueue.SingerKey.ToArray());
     QueueRound  = tscqueue.QueueRound;
     QueueOrder  = tscqueue.QueueOrder;
     QueueSong   = new string(tscqueue.QueueSong.ToArray());
     QueueArtist = new string(tscqueue.QueueArtist.ToArray());
     QueueNote   = new string(tscqueue.QueueNote.ToArray());
     QueueLink   = new string(tscqueue.QueueLink.ToArray());
     QueueState  = new string(tscqueue.QueueState.ToArray());
 }
Пример #4
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            TSCQueue a = obj as TSCQueue;

            if (a == null)
            {
                return(false);
            }
            return(FieldsEqual(this, a));
        }
Пример #5
0
        int IComparable.CompareTo(object obj)
        {
            if (obj == null)
            {
                return(1);
            }
            TSCQueue q = obj as TSCQueue;

            if (q == null)
            {
                return(1);
            }
            return(QueueOrder.CompareTo(q.QueueOrder));
        }
Пример #6
0
 private static bool FieldsEqual(TSCQueue a, TSCQueue b)
 {
     return(
         (a.EventKey == b.EventKey) &&
         (a.SingerKey == b.SingerKey) &&
         (a.QueueRound == b.QueueRound) &&
         (a.QueueOrder == b.QueueOrder) &&
         (a.QueueSong == b.QueueSong) &&
         (a.QueueArtist == b.QueueArtist) &&
         (a.QueueNote == b.QueueNote) &&
         (a.QueueLink == b.QueueLink) &&
         (a.QueueState == b.QueueState) &&
         (true)
         );
 }