Struct ID
The universal unique identifier used to reference bank content.
Implements
Inherited Members
Namespace: Stem
Assembly: Stem.dll
Syntax
[Serializable]
public struct ID : IEquatable<ID>
Constructors
| Improve this Doc View SourceID(Int32, Int32, Int32, Int32, Int32)
Creates a new ID based on bank and sound/sound bus/playlist/music player identifiers.
Declaration
public ID(int guidA, int guidB, int guidC, int guidD, int id)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | guidA | The first part of a bank identifier. |
System.Int32 | guidB | The second part of a bank identifier. |
System.Int32 | guidC | The third part of a bank identifier. |
System.Int32 | guidD | The fourth part of a bank identifier. |
System.Int32 | id | Unique identifier of a sound, sound bus, playlist or music player. |
Fields
| Improve this Doc View SourceNone
The shorthand for writing ID(0, 0, 0, 0, 0) that does not refer to anything.
Declaration
public static readonly ID None
Field Value
Type | Description |
---|---|
ID | A read-only ID. |
Properties
| Improve this Doc View SourceBankGuidA
The first part of a bank this ID refers to.
Declaration
public int BankGuidA { get; }
Property Value
Type | Description |
---|---|
System.Int32 | An integer value. |
BankGuidB
The second part of a bank this ID refers to.
Declaration
public int BankGuidB { get; }
Property Value
Type | Description |
---|---|
System.Int32 | An integer value. |
BankGuidC
The third part of a bank this ID refers to.
Declaration
public int BankGuidC { get; }
Property Value
Type | Description |
---|---|
System.Int32 | An integer value. |
BankGuidD
The fourth part of a bank this ID refers to.
Declaration
public int BankGuidD { get; }
Property Value
Type | Description |
---|---|
System.Int32 | An integer value. |
ItemId
The sound, sound bus, playlist or music player this ID refers to.
Declaration
public int ItemId { get; }
Property Value
Type | Description |
---|---|
System.Int32 | An integer value. |
Remarks
This value corresponds to Sound, SoundBus, Playlist or MusicPlayer ID.
Methods
| Improve this Doc View SourceBankEquals(ID)
Checks if two IDs are referencing to the same bank.
Declaration
public bool BankEquals(ID id)
Parameters
Type | Name | Description |
---|---|---|
ID | id | An ID to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True, if both IDs reference to the same bank. False otherwise. |
Equals(ID)
Checks if two IDs are equal.
Declaration
public bool Equals(ID id)
Parameters
Type | Name | Description |
---|---|---|
ID | id | An ID to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True, if both IDs are equal. False otherwise. |
Equals(Object)
Checks if two object instances are equal.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | A reference to an object. |
Returns
Type | Description |
---|---|
System.Boolean | True, if |
Overrides
GetHashCode()
Calculates the hash of an ID.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for the ID. |
Overrides
ToString()
Returns a string that represents the ID.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string representation of an ID. |
Overrides
Operators
| Improve this Doc View SourceEquality(ID, ID)
Checks if two IDs are equal.
Declaration
public static bool operator ==(ID id1, ID id2)
Parameters
Type | Name | Description |
---|---|---|
ID | id1 | The first ID to compare. |
ID | id2 | The second ID to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True, if both IDs are equal. False otherwise. |
Inequality(ID, ID)
Checks if two IDs are not equal.
Declaration
public static bool operator !=(ID id1, ID id2)
Parameters
Type | Name | Description |
---|---|---|
ID | id1 | The first ID to compare. |
ID | id2 | The second ID to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True, if both IDs are not equal. False otherwise. |