Пример #1
0
        }               // public string DisplayBitMaskFromMultilineString (2 OF 2)

        #endregion      // Public Instance Methods


        #region Private Instance Methods
        private void InitializeInstance(
            int pintTypeInfoIndex,
            object pbytBitMask,
            BitArray32.BitDisplayOrder penmBitDisplayOrder)
        {
            _bclTypeInfo = BitHelpers.s_abclintegertypeinfo [pintTypeInfoIndex];

            _objUnderlyingInteger = pbytBitMask;
            _enmBitDisplayOrder   = penmBitDisplayOrder;

            _strDecimalRepresentation = string.Format(
                FORMAT_FIRST_ITEM_AS_DECIMAL,
                _objUnderlyingInteger);
            _strHexadecimalRepresentation = BitArray32.FormatIntegerAsHex(_objUnderlyingInteger);

            _strTens = BitArray32.GetRulerTens(
                (BitArray32.BitCount)_bclTypeInfo.CapacityInBits,
                _enmBitDisplayOrder);
            _strUnits = BitArray32.GetRulerUnits(
                (BitArray32.BitCount)_bclTypeInfo.CapacityInBits,
                _enmBitDisplayOrder);
            _strArrayOfBits = string.Format(
                new WizardWrx.BitMaskFormat( ),
                _enmBitDisplayOrder == BitArray32.BitDisplayOrder.LowBitToHighBit
                                        ? FORMAT_FIRST_ITEM_AS_REVERSED_BIT_ARRAY :
                FORMAT_FIRST_ITEM_AS_BIT_ARRAY,
                _objUnderlyingInteger);
        }               // private void InitializeInstance
Пример #2
0
        }               // BitMaskAndRuler constructor (3 of 8)

        /// <summary>
        /// Construct a bit mask from any integral type. In this context, a Byte
        /// is treated as an unsigned integer of 8 bits.
        /// </summary>
        /// <param name="puintBitMask">
        /// Specify the UInt32 (Unsigned 32 bit integer) to treat as a bit mask.
        /// </param>
        /// <param name="penmBitDisplayOrder">
        /// Indicate the direction in which the ruler should be displayed. See
        /// the XML documentation for the BitDisplayOrder enumeration for a full
        /// explanation of each value.
        /// </param>
        /// <see cref="BitArray32.BitDisplayOrder"/>
        public BitMaskAndRuler(
            UInt32 puintBitMask,
            BitArray32.BitDisplayOrder penmBitDisplayOrder)
        {
            InitializeInstance(
                BitHelpers.BCL_INTEGRAL_TYPEINFO_UINT32,
                puintBitMask,
                penmBitDisplayOrder);
        }               // BitMaskAndRuler constructor (4 of 8)
Пример #3
0
        }               // BitMaskAndRuler constructor (4 of 8)

        /// <summary>
        /// Construct a bit mask from any integral type. In this context, a Byte
        /// is treated as an unsigned integer of 8 bits.
        /// </summary>
        /// <param name="pintBitMask">
        /// Specify the Int64 (Signed 64 bit integer) to treat as a bit mask.
        /// </param>
        /// <param name="penmBitDisplayOrder">
        /// Indicate the direction in which the ruler should be displayed. See
        /// the XML documentation for the BitDisplayOrder enumeration for a full
        /// explanation of each value.
        /// </param>
        /// <see cref="BitArray32.BitDisplayOrder"/>
        public BitMaskAndRuler(
            Int64 pintBitMask,
            BitArray32.BitDisplayOrder penmBitDisplayOrder)
        {
            InitializeInstance(
                BitHelpers.BCL_INTEGRAL_TYPEINFO_INT64,
                pintBitMask,
                penmBitDisplayOrder);
        }               // BitMaskAndRuler constructor (5 of 8)
Пример #4
0
        }               // BitMaskAndRuler constructor (1 of 8)

        /// <summary>
        /// Construct a bit mask from any integral type. In this context, a Byte
        /// is treated as an unsigned integer of 8 bits.
        /// </summary>
        /// <param name="pbytBitMask">
        /// Specify the Byte (Unsigned 8 bit integer) to treat as a bit mask.
        /// </param>
        /// <param name="penmBitDisplayOrder">
        /// Indicate the direction in which the ruler should be displayed. See
        /// the XML documentation for the BitDisplayOrder enumeration for a full
        /// explanation of each value.
        /// </param>
        /// <see cref="BitArray32.BitDisplayOrder"/>
        public BitMaskAndRuler(
            System.Byte pbytBitMask,
            BitArray32.BitDisplayOrder penmBitDisplayOrder)
        {
            InitializeInstance(
                BitHelpers.BCL_INTEGRAL_TYPEINFO_BYTE,
                pbytBitMask,
                penmBitDisplayOrder);
        }               // BitMaskAndRuler constructor (2 of 8)