コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BitComparator"/> class.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <param name="bitOperator">The bit operator.</param>
        /// <exception cref="InvalidEnumArgumentException">The value of <paramref name="bitOperator"/> is not recognized.</exception>
        public BitComparator(byte[] value, BitwiseOp bitOperator) : base(value)
        {
            if (!Enum.IsDefined(typeof(BitwiseOp), bitOperator))
            {
                throw new InvalidEnumArgumentException("bitOperator", (int)bitOperator, typeof(BitwiseOp));
            }

            BitOperator = bitOperator;
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BitComparator"/> class.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <param name="bitOperator">The bit operator.</param>
        /// <exception cref="InvalidEnumArgumentException">The value of <paramref name="bitOperator"/> is not recognized.</exception>
        public BitComparator(byte[] value, BitwiseOp bitOperator) : base(value)
        {
            if (!Enum.IsDefined(typeof(BitwiseOp), bitOperator))
            {
                throw new InvalidEnumArgumentException("bitOperator", (int)bitOperator, typeof(BitwiseOp));
            }

            BitOperator = bitOperator;
        }
コード例 #3
0
        public void TestCreateBitwiseOp03()
        {
            BitwiseOp bitwiseOp = CreateBitwiseOp03();

            Assert.IsNotNull(bitwiseOp);
            #region Record State
            ValueRecorder recorder = new ValueRecorder();
            recorder.Record((OperatorPriority)bitwiseOp.Priority);
            recorder.FinishRecording();
            #endregion
        }