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>
|
Improve this Doc
View Source
Constructors
ItemId(ObjectId)
public ItemId(ObjectId id)
Parameters
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
|
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
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
Returns
Type |
Description |
System.Boolean |
|
Inequality(ItemId, ItemId)
public static bool operator !=(ItemId left, ItemId right)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Extension Methods