Beispiel #1
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="MessageHolder">A message holder object to compare with.</param>
        public Int32 CompareTo(MessageHolder <TId, TMessage> MessageHolder)
        {
            if ((Object)MessageHolder == null)
            {
                throw new ArgumentNullException(nameof(ServiceTicket), "The given message holder must not be null!");
            }

            return(Id.CompareTo(MessageHolder.Id));
        }
Beispiel #2
0
        /// <summary>
        /// Compares two message holders for equality.
        /// </summary>
        /// <param name="MessageHolder">A message holder to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(MessageHolder <TId, TMessage> MessageHolder)
        {
            if ((Object)MessageHolder == null)
            {
                return(false);
            }

            return(Id.Equals(MessageHolder.Id));
        }