Table of Contents

Struct ObjectIdBuilder

Namespace
Stride.Core.Storage
Assembly
Stride.Core.dll

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

int

Seed

public uint Seed { get; }

Property Value

uint

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

buffer byte*

The buffer.

length int

The lenght.

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

buffer byte[]

The buffer.

offset int

The offset.

count int

The count.

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 byte

The 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 T

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 : unmanaged

Parameters

buffer T[]

The buffer.

offset int

The offset.

count int

The count.

Type Parameters

T

Type must be a struct