/// <summary> /// Parses a <see cref="uint"/> from the specified <see cref="ReadOnlyBuffer"/> /// </summary> /// <param name="buffer">The <see cref="ReadOnlyBuffer"/> to parse</param> public static uint GetUInt32(this ReadOnlyBuffer buffer) { if (!buffer.AsSequence().TryParseUInt32(out uint value, out int consumed)) { throw new InvalidOperationException("could not parse uint"); } return(value); }