Exemplo n.º 1
0
        /// <summary>
        /// Creates a new <see cref="DicePacket"/> instance
        /// </summary>
        /// <param name="sequence"></param>
        /// <param name="words"></param>
        public DicePacket(IDicePacketSequence sequence, IEnumerable<IDiceWord> words)
        {
            #region Contracts
            if (sequence == null)
            {
                throw new ArgumentNullException("sequence");
            }

            if (words == null)
            {
                throw new ArgumentNullException("words");
            }
            #endregion

            Sequence = sequence;
            this.words = words.ToList();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Indicates whether the current object is equal to another object of the same type.
 /// </summary>
 /// <returns>
 /// true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false.
 /// </returns>
 /// <param name="other">An object to compare with this object.</param>
 public bool Equals(IDicePacketSequence other)
 {
     return Id == other.Id
            && Origin == other.Origin
            && Type == other.Type;
 }