Exemple #1
0
        public void SetValue(ref ushort packedValue, T value)
        {
            unchecked
            {
                var convert = (ushort)Convert(value);

                Validate(convert);

                packedValue = PackedValueHelper.SetUShortValue(packedValue, convert, BitOffset, BitCount, _mask_ushort, _exmask_ushort);
            }
        }
Exemple #2
0
        public void SetValue(ref byte packedValue, T value)
        {
            unchecked
            {
                var convert = (byte)Convert(value);

                Validate(convert);

                packedValue = PackedValueHelper.SetByteValue(packedValue, convert, BitOffset, BitCount, _mask_byte, _exmask_byte);
            }
        }
Exemple #3
0
        public void SetValue(ref ulong packedValue, T value)
        {
            unchecked
            {
                var convert = Convert(value);

                Validate(convert);

                packedValue = PackedValueHelper.SetULongValue(packedValue, convert, BitOffset, BitCount, _mask_ulong, _exmask_ulong);
            }
        }
Exemple #4
0
 public T GetValue(byte packedValue)
 {
     return(Convert(PackedValueHelper.GetByteValue(packedValue, BitOffset, BitCount, _mask_byte)));
 }
Exemple #5
0
 public T GetValue(ushort packedValue)
 {
     return(Convert(PackedValueHelper.GetUShortValue(packedValue, BitOffset, BitCount, _mask_ushort)));
 }
Exemple #6
0
 public T GetValue(uint packedValue)
 {
     return(Convert(PackedValueHelper.GetUIntValue(packedValue, BitOffset, BitCount, _mask_uint)));
 }
Exemple #7
0
 public T GetValue(ulong packedValue)
 {
     return(Convert(PackedValueHelper.GetULongValue(packedValue, BitOffset, BitCount, _mask_ulong)));
 }