예제 #1
0
        // Constructors ///////////////////////////////////////////////////////

        /// <summary>
        ///     Construct from format and operand list.
        /// </summary>
        /// <exception cref="ArgumentException">
        /// If the format of the operands given is different from
        /// </exception>
        public SourceInstruction([NotNull] InstructionFormat format, [NotNull] OperandList operands)
        {
            if (!format.OperandFormat.Equals(operands.Format))
            {
                throw new ArgumentException("Operand formats do not match.");
            }

            Format   = format;
            Operands = operands;
        }
 /// <inheritdoc />
 protected bool Equals([NotNull] InstructionFormat other) =>
 Equals(Mnemonic, other.Mnemonic) &&
 Equals(OperandFormat, other.OperandFormat);