Struct ObjectIdBuilder
A builder for ObjectId using Murmurshash3 128 bits
public struct ObjectIdBuilder- Inherited Members
Constructors
ObjectIdBuilder(uint)
public ObjectIdBuilder(uint seed = 0)Parameters
- seeduint
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
- resultObjectId
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
- bufferbyte[]
- 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
- spanReadOnlySpan<byte>
- The readonly span. 
Exceptions
- ArgumentNullException
- buffer 
- ArgumentOutOfRangeException
- count;Offset + Count is out of range 
Write(string)
public void Write(string str)Parameters
- strstring
WriteByte(byte)
Writes a byte to the builder.
public void WriteByte(byte value)Parameters
- valuebyte
- The value. 
Write<T>(ReadOnlySpan<T>)
Writes the specified buffer to this instance.
public void Write<T>(ReadOnlySpan<T> buffer) where T : unmanagedParameters
- bufferReadOnlySpan<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 : unmanagedParameters
- dataT
- The 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 : unmanagedParameters
Type Parameters
- T
- Type must be a struct