src/Orleans.Serialization/Buffers/Writer.cs
/// <summary>
/// Writes the provided <see cref="uint"/> to the output buffer as a variable-width integer.
/// </summary>
/// <param name="value">The value.</param>
Writes the provided  to the output buffer as a variable-width integer.
Writes the provided to the output buffer as a variable - width integer .
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public void WriteVarUInt32(uint value)
        {
            EnsureContiguous(sizeof(ulong));
            var pos = _bufferPos;
            var neededBytes = BitOperations.Log2(value) / 7;
            _bufferPos += neededBytes + 1;
            ulong lower = value;
            lower <<= 1;
            lower |= 0x01;
            lower <<= neededBytes;
            Unsafe.WriteUnaligned(ref Unsafe.Add(ref MemoryMarshal.GetReference(_currentSpan), pos), lower);
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] public void WriteVarUInt32 ( uint value ) { EnsureContiguous ( sizeof ( ulong ) ) ; var pos = _bufferPos ; var neededBytes = BitOperations . Log2 ( value ) / 7 ; _bufferPos += neededBytes + 1 ; ulong lower = value ; lower <<= 1 ; lower |= 0x01 ; lower <<= neededBytes ; Unsafe . WriteUnaligned ( ref Unsafe . Add ( ref MemoryMarshal . GetReference ( _currentSpan ) , pos ) , lower ) ; }
Writes the provided  to the output buffer as a variable-width integer.
Writes the provided to the output buffer as a variable - width integer .
// Since this method writes a ulong worth of bytes unconditionally, ensure that there is sufficient space.
value
uint
None