Exemple #1
0
 public ArraySlice(ArraySlice <T> arraySlice, int offset, int count) : this(arraySlice.Array, arraySlice.Offset + offset, count)
 {
 }
Exemple #2
0
 public ArraySlice(ArraySlice <T> arraySlice, int offset) : this(arraySlice.Array, arraySlice.Offset + offset, arraySlice.Count - offset)
 {
 }
Exemple #3
0
 public static bool GetBoolean(this ArraySlice <byte> arraySlice, int offset = 0, int bitOffset = 0)
 {
     return(Convert.ToBoolean(arraySlice[offset] >> bitOffset));
 }
Exemple #4
0
 public ArraySlice(ArraySlice <T> arraySlice) : this(arraySlice.Array, arraySlice.Offset, arraySlice.Count)
 {
 }
Exemple #5
0
        public static Single GetSingle(this ArraySlice <byte> arraySlice, int offset = 0, bool bigEndian = false)
        {
            var value = BitConverter.ToSingle(arraySlice.Array, arraySlice.Offset + offset);

            return(BitConverter.IsLittleEndian && bigEndian ? value : value.Reverse());
        }