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