Struct ParticipantId
Holds information about participant identifier.
Inherited Members
Namespace: Unity.Cloud.Presence
Syntax
public readonly struct ParticipantId
Constructors
ParticipantId(Guid)
Returns a ParticipantId using a Guid.
Declaration
public ParticipantId(Guid value)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | value | The guid representing the participant identifier. |
ParticipantId(String)
Returns a ParticipantId using a String.
Declaration
public ParticipantId(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | value | The string representing the participant identifier. |
Fields
None
Returns the value of an identifier representing an invalid participant Id.
Declaration
public static readonly ParticipantId None
Field Value
| Type | Description |
|---|---|
| ParticipantId |
Methods
Equals(Object)
Validates if obj is a ParticipantId instance and has the same values as this instance.
Declaration
public override readonly bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | obj | Compare the values with this instance. |
Returns
| Type | Description |
|---|---|
| Boolean | true if both instance have the same values; false otherwise. |
Overrides
Equals(ParticipantId)
Returns whether two ParticipantId objects are equals.
Declaration
public readonly bool Equals(ParticipantId other)
Parameters
| Type | Name | Description |
|---|---|---|
| ParticipantId | other |
Returns
| Type | Description |
|---|---|
| Boolean | true if both instance have the same values; false otherwise. |
GetHashCode()
Computes a hash code for the object.
Declaration
public override readonly int GetHashCode()
Returns
| Type | Description |
|---|---|
| Int32 | A hash code for the current object. |
Overrides
Remarks
- You should not assume that equal hash codes imply object equality.
- You should never persist or use a hash code outside the application domain in which it was created, because the same object may hash differently across application domains, processes, and platforms.
ToString()
Get the string representation of this ParticipantId.
Declaration
public override readonly string ToString()
Returns
| Type | Description |
|---|---|
| String | The string result. |
Overrides
Operators
Equality(ParticipantId, ParticipantId)
Gets whether two ParticipantId instances are the same.
Declaration
public static bool operator ==(ParticipantId left, ParticipantId right)
Parameters
| Type | Name | Description |
|---|---|---|
| ParticipantId | left | Compare with this first instance. |
| ParticipantId | right | Compare with this other instance. |
Returns
| Type | Description |
|---|---|
| Boolean |
Explicit(ParticipantId to String)
Declaration
public static explicit operator string (ParticipantId sId)
Parameters
| Type | Name | Description |
|---|---|---|
| ParticipantId | sId |
Returns
| Type | Description |
|---|---|
| String |
Inequality(ParticipantId, ParticipantId)
Gets whether two ParticipantId instances are not the same.
Declaration
public static bool operator !=(ParticipantId left, ParticipantId right)
Parameters
| Type | Name | Description |
|---|---|---|
| ParticipantId | left | Compare with this first instance. |
| ParticipantId | right | Compare with this other instance. |
Returns
| Type | Description |
|---|---|
| Boolean | true if both instances are not the same; false if both instances are the same. |