Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    ObjectIdSimpleBuilder Struct

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

    An optimized version of ObjectIdBuilder to output a ObjectId expecting data to hash be 32bits integers only. See remarks.

    public struct ObjectIdSimpleBuilder
    Remarks

    This implementation is suited when it can be feeded with 32bits values. The resulting value must be identical to ObjectIdBuilder if the length size of the data is a multiple of 16 bytes.

    Name Description
    Constructors
    ObjectIdSimpleBuilder(UInt32)
    Properties
    Length
    Seed
    Methods
    ComputeHash()

    Gets the current calculated hash.

    ComputeHash(out ObjectId)

    Gets the current calculated hash.

    Reset()
    Write(Int32)
    Write(UInt32)
    Write<T>(T)

    Writes the specified data to this builder. Size of data must be multiple of 4 bytes.

    | Improve this Doc View Source

    Constructors


    ObjectIdSimpleBuilder(UInt32)

    public ObjectIdSimpleBuilder(uint seed = 0U)
    Parameters
    Type Name Description
    System.UInt32 seed
    | Improve this Doc View Source

    Properties


    Length

    public readonly uint Length { get; }
    Property Value
    Type Description
    System.UInt32

    Seed

    public readonly uint Seed { get; }
    Property Value
    Type Description
    System.UInt32
    | Improve this Doc View Source

    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(Int32)

    public void Write(int data)
    Parameters
    Type Name Description
    System.Int32 data

    Write(UInt32)

    public void Write(uint data)
    Parameters
    Type Name Description
    System.UInt32 data

    Write<T>(T)

    Writes the specified data to this builder. Size of data must be multiple of 4 bytes.

    public void Write<T>(T data)
        where T : struct
    Parameters
    Type Name Description
    T data

    The data to add to this builder

    Type Parameters
    Name Description
    T

    Struct type with a size multiple of 4 bytes


    Inherited Members

    System.ValueType.Equals(System.Object)
    System.ValueType.GetHashCode()
    System.ValueType.ToString()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation