public static T Read <[Primitive] T>(this Span <byte> slice) where T : struct { Contract.Requires(slice.Length >= PtrUtils.SizeOf <T>()); return(PtrUtils.Get <T>(slice.Object, slice.Offset)); }
public static T Read <[Primitive] T>(this ReadOnlySpan <byte> slice) where T : struct { Contract.RequiresInInclusiveRange(PtrUtils.SizeOf <T>(), (uint)slice.Length); return(PtrUtils.Get <T>(slice.Object, slice.Offset, (UIntPtr)0)); }
internal T GetItemWithoutBoundariesCheck(int index) { return(PtrUtils.Get <T>(Object, Offset, (UIntPtr)index)); }
internal T GetItemWithoutBoundariesCheck(int index) { return(PtrUtils.Get <T>( Object, Offset + (index * PtrUtils.SizeOf <T>()))); }