Ejemplo n.º 1
0
        internal static int BitDecodeResourceModelIndex(uint handle, int bitIndex)
        {
            var index = Bits.BitDecodeNoneable(handle, bitIndex, kResourceModelBitMask);

            Contract.Assert(IsValidResourceModelIndex(index));
            return(index);
        }
Ejemplo n.º 2
0
        internal static int BitDecodeLanguageIndex(uint handle, int bitIndex)
        {
            var index = Bits.BitDecodeNoneable(handle, bitIndex, kLanguageIndexBitMask);

            Contract.Assert(IsValidLanguageIndex(index));
            return(index);
        }
Ejemplo n.º 3
0
        internal static int BitDecodeIndex(uint handle, int bitIndex)
        {
            var index = Bits.BitDecodeNoneable(handle, bitIndex, kIndexBitMask);

            Contract.Assert(index.IsNoneOrPositive());
            return(index);
        }
Ejemplo n.º 4
0
        internal static int BitDecodeIndex(uint handle, int bitIndex)
        {
            var index = Bits.BitDecodeNoneable(handle, bitIndex, kIndexBitMask);

            Contract.Assert(index.IsNoneOrPositive() && index < EngineRegistry.Engines.Count);
            return(index);
        }
Ejemplo n.º 5
0
        /// <summary>Bit decode a value from this handle</summary>
        /// <param name="value">Value decoded from this handle</param>
        /// <param name="traits"></param>
        public void DecodeNoneable64(out long value, Bitwise.BitFieldTraits traits)
        {
            Contract.Requires <ArgumentException>(!traits.IsEmpty);

            value = (long)Bits.BitDecodeNoneable(mBits.u64, ref mBitIndex, traits.Bitmask64);
        }
Ejemplo n.º 6
0
        /// <summary>Bit decode a value from this handle</summary>
        /// <param name="value">Value decoded from this handle</param>
        /// <param name="bitMask">Masking value for <paramref name="value"/></param>
        public void DecodeNoneable64(out long value, ulong bitMask)
        {
            Contract.Requires <ArgumentException>(bitMask != 0);

            value = (long)Bits.BitDecodeNoneable(mBits.u64, ref mBitIndex, bitMask);
        }
Ejemplo n.º 7
0
        /// <summary>Bit decode a value from this handle</summary>
        /// <param name="value">Value decoded from this handle</param>
        /// <param name="traits"></param>
        public void DecodeNoneable32(out int value, Bitwise.BitFieldTraits traits)
        {
            Contract.Requires <ArgumentException>(!traits.IsEmpty);

            value = (int)Bits.BitDecodeNoneable(mBits.u64, ref mBitIndex, traits.Bitmask32);
        }
Ejemplo n.º 8
0
        /// <summary>Bit decode a value from this handle</summary>
        /// <param name="value">Value decoded from this handle</param>
        /// <param name="bitMask">Masking value for <paramref name="value"/></param>
        public void DecodeNoneable32(out int value, uint bitMask)
        {
            Contract.Requires <ArgumentException>(bitMask != 0);

            value = (int)Bits.BitDecodeNoneable(mBits.u64, ref mBitIndex, bitMask);
        }