ObjectIdBuilder Struct
Namespace: Stride.Core.StorageAssembly: Stride.Core.dll
A builder for ObjectId using Murmurshash3 128 bits
public struct ObjectIdBuilder
Name | Description | |
---|---|---|
Constructors | ||
ObjectIdBuilder(UInt32) | ||
Properties | ||
Length | ||
Seed | ||
Methods | ||
ComputeHash() | Gets the current calculated hash. |
|
ComputeHash(out ObjectId) | Gets the current calculated hash. |
|
Reset() | ||
Write(Byte*, Int32) | Writes a buffer of byte to this builder. |
|
Write(Byte[]) | Writes a buffer of byte to this builder. |
|
Write(Byte[], Int32, Int32) | Writes a buffer of byte to this builder. |
|
Write(String) | ||
Write<T>(T) | Writes the specified buffer to this instance. |
|
Write<T>(ref T) | Writes the specified buffer to this instance. |
|
Write<T>(T[], Int32, Int32) | Writes the specified buffer to this instance. |
|
WriteByte(Byte) | Writes a byte to the builder. |
Constructors
ObjectIdBuilder(UInt32)
public ObjectIdBuilder(uint seed = 0U)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | seed |
Properties
Length
public readonly int Length { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Seed
public readonly uint Seed { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Methods
ComputeHash()
Gets the current calculated hash.
public ObjectId ComputeHash()
Returns
Type | Description |
---|---|
ObjectId | The current hash. |
ComputeHash(out ObjectId)
Gets the current calculated hash.
public void ComputeHash(out ObjectId result)
Parameters
Type | Name | Description |
---|---|---|
ObjectId | result |
Reset()
public void Reset()
Write(Byte*, Int32)
Writes a buffer of byte to this builder.
public void Write(byte *buffer, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Byte* | buffer | The buffer. |
System.Int32 | length |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | buffer |
System.ArgumentOutOfRangeException | count;Offset + Count is out of range |
Write(Byte[])
Writes a buffer of byte to this builder.
public void Write(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | The buffer. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | buffer |
System.ArgumentOutOfRangeException | buffer |
Write(Byte[], Int32, Int32)
Writes a buffer of byte to this builder.
public void Write(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | The buffer. |
System.Int32 | offset | The offset. |
System.Int32 | count | The count. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | buffer |
System.ArgumentOutOfRangeException | count;Offset + Count is out of range |
Write(String)
public void Write(string str)
Parameters
Type | Name | Description |
---|---|---|
System.String | str |
Write<T>(T)
Writes the specified buffer to this instance.
public void Write<T>(T data)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
T | data | The data. |
Type Parameters
Name | Description |
---|---|
T | Type must be a struct |
Write<T>(ref T)
Writes the specified buffer to this instance.
public void Write<T>(ref T data)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
T | data | The data. |
Type Parameters
Name | Description |
---|---|
T | Type must be a struct |
Write<T>(T[], Int32, Int32)
Writes the specified buffer to this instance.
public void Write<T>(T[] buffer, int offset, int count)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
T[] | buffer | The buffer. |
System.Int32 | offset | The offset. |
System.Int32 | count | The count. |
Type Parameters
Name | Description |
---|---|
T | Type must be a struct |
WriteByte(Byte)
Writes a byte to the builder.
public void WriteByte(byte value)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | value | The value. |