Struct ObjectIdBuilder
A builder for ObjectId using Murmurshash3 128 bits
public struct ObjectIdBuilder
- Inherited Members
Constructors
ObjectIdBuilder(uint)
public ObjectIdBuilder(uint seed = 0)
Parameters
seed
uint
Properties
Length
public int Length { get; }
Property Value
Seed
public uint Seed { get; }
Property Value
Methods
ComputeHash()
Gets the current calculated hash.
public ObjectId ComputeHash()
Returns
- ObjectId
The current hash.
ComputeHash(out ObjectId)
Gets the current calculated hash.
public void ComputeHash(out ObjectId result)
Parameters
result
ObjectId
Reset()
public void Reset()
Write(byte*, int)
Writes a buffer of byte to this builder.
[Obsolete("Use Write(ReadOnlySpan<byte>)")]
public void Write(byte* buffer, int length)
Parameters
Exceptions
- ArgumentNullException
buffer
- ArgumentOutOfRangeException
count;Offset + Count is out of range
Write(byte[])
Writes a buffer of byte to this builder.
public void Write(byte[] buffer)
Parameters
buffer
byte[]The buffer.
Exceptions
- ArgumentNullException
buffer
- ArgumentOutOfRangeException
buffer
Write(byte[], int, int)
Writes a buffer of byte to this builder.
public void Write(byte[] buffer, int offset, int count)
Parameters
Exceptions
- ArgumentNullException
buffer
- ArgumentOutOfRangeException
count;Offset + Count is out of range
Write(ReadOnlySpan<byte>)
Writes a buffer of byte to this builder.
public void Write(ReadOnlySpan<byte> span)
Parameters
span
ReadOnlySpan<byte>The readonly span.
Exceptions
- ArgumentNullException
buffer
- ArgumentOutOfRangeException
count;Offset + Count is out of range
Write(string)
public void Write(string str)
Parameters
str
string
WriteByte(byte)
Writes a byte to the builder.
public void WriteByte(byte value)
Parameters
value
byteThe value.
Write<T>(ReadOnlySpan<T>)
Writes the specified buffer to this instance.
public void Write<T>(ReadOnlySpan<T> buffer) where T : unmanaged
Parameters
buffer
ReadOnlySpan<T>The buffer.
Type Parameters
T
Type must be a struct
Write<T>(T)
Writes the specified buffer to this instance.
public void Write<T>(T data) where T : unmanaged
Parameters
data
TThe data.
Type Parameters
T
Type must be a struct
Write<T>(T[], int, int)
Writes the specified buffer to this instance.
public void Write<T>(T[] buffer, int offset, int count) where T : unmanaged
Parameters
Type Parameters
T
Type must be a struct