Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    ItemId Struct

    Namespace: Stride.Core.Reflection
    Assembly: Stride.Core.Assets.dll

    Represents the identifier of an item in a collection or an entry in a dictionary.

    [DataContract]
    public struct ItemId : IComparable<ItemId>, IEquatable<ItemId>
    Name Description
    Constructors
    ItemId(ObjectId)

    Initializes a new instance of the ItemId structure from an ObjectId.

    ItemId(Byte[])

    Initializes a new instance of the ItemId structure from an array of bytes.

    Properties
    Empty

    Gets an ItemId representing an empty or non-existing item.

    Methods
    CompareTo(ItemId)
    Equals(ItemId)
    Equals(Object)
    GetHashCode()
    New()

    Generates a new random ItemId.

    Parse(String)

    Parses an ItemId from a string.

    ToString()
    TryParse(String, out ItemId)

    Attempts to parse an ItemId from a string.

    Operators
    Equality(ItemId, ItemId)
    Inequality(ItemId, ItemId)
    | Improve this Doc View Source

    Constructors


    ItemId(ObjectId)

    Initializes a new instance of the ItemId structure from an ObjectId.

    public ItemId(ObjectId id)
    Parameters
    Type Name Description
    ObjectId id

    The ObjectId from which to create this ItemId.


    ItemId(Byte[])

    Initializes a new instance of the ItemId structure from an array of bytes.

    public ItemId(byte[] bytes)
    Parameters
    Type Name Description
    System.Byte[] bytes

    The array of bytes from which to create this ItemId.

    | Improve this Doc View Source

    Properties


    Empty

    Gets an ItemId representing an empty or non-existing item.

    public static readonly ItemId Empty { get; }
    Property Value
    Type Description
    ItemId
    | Improve this Doc View Source

    Methods


    CompareTo(ItemId)

    public int CompareTo(ItemId other)
    Parameters
    Type Name Description
    ItemId other
    Returns
    Type Description
    System.Int32

    Equals(ItemId)

    public bool Equals(ItemId other)
    Parameters
    Type Name Description
    ItemId other
    Returns
    Type Description
    System.Boolean

    Equals(Object)

    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.ValueType.Equals(System.Object)

    GetHashCode()

    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.ValueType.GetHashCode()

    New()

    Generates a new random ItemId.

    public static ItemId New()
    Returns
    Type Description
    ItemId

    Parse(String)

    Parses an ItemId from a string.

    public static ItemId Parse(string input)
    Parameters
    Type Name Description
    System.String input

    The input string to parse.

    Returns
    Type Description
    ItemId

    An ItemId corresponding to the parsed string.

    Exceptions
    Type Condition
    System.FormatException

    The given string cannot be parsed as an ItemId.


    ToString()

    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.ValueType.ToString()

    TryParse(String, out ItemId)

    Attempts to parse an ItemId from a string.

    public static bool TryParse(string input, out ItemId itemId)
    Parameters
    Type Name Description
    System.String input

    The input string to parse.

    ItemId itemId

    The resulting ItemId.

    Returns
    Type Description
    System.Boolean

    True if the string could be successfully parsed, False otherwise.

    | Improve this Doc View Source

    Operators


    Equality(ItemId, ItemId)

    public static bool operator ==(ItemId left, ItemId right)
    Parameters
    Type Name Description
    ItemId left
    ItemId right
    Returns
    Type Description
    System.Boolean

    Inequality(ItemId, ItemId)

    public static bool operator !=(ItemId left, ItemId right)
    Parameters
    Type Name Description
    ItemId left
    ItemId right
    Returns
    Type Description
    System.Boolean

    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