Struct IdPair<IdType, T>
Helper pair for keeping track of things by ID.
Inherited Members
Namespace: Microsoft.MixedReality.WorldLocking.Core.ResourceMirrorHelper
Assembly: cs.temp.dll.dll
Syntax
public struct IdPair<IdType, T>
Type Parameters
| Name | Description |
|---|---|
| IdType | Type of the identifier. |
| T | Type of the data associated with the identifier. |
Remarks
The IdType is typically an AnchorId, but any type using the Comparer.Default.Compare is fine. Note this is independent of the ResourceMirror, and currently only used to internally for resources identified by anchorId, and to expedite tests.
Fields
id
Identifier field.
Declaration
public IdType id
Field Value
| Type | Description |
|---|---|
| IdType |
target
Data associated with identifier.
Declaration
public T target
Field Value
| Type | Description |
|---|---|
| T |
Methods
CompareById(IdPair<IdType, T>, IdPair<IdType, T>)
Convenience comparison function comparing by identifier (ignoring associated data).
Declaration
public static int CompareById(IdPair<IdType, T> lhs, IdPair<IdType, T> rhs)
Parameters
| Type | Name | Description |
|---|---|---|
| IdPair<IdType, T> | lhs | The left hand side. |
| IdPair<IdType, T> | rhs | The right hand side. |
Returns
| Type | Description |
|---|---|
| Int32 | If lhs GT rhs then -1 else if lhs LT rhs then 1 else 0 |