Struct WorkspaceId
This struct holds information about workspace identifier.
Inherited Members
Namespace: Unity.Cloud.Common
Syntax
public readonly struct WorkspaceIdConstructors
WorkspaceId(Guid)
Returns a WorkspaceId using a Guid.
Declaration
public WorkspaceId(Guid value)Parameters
| Type | Name | Description | 
|---|---|---|
| Guid | value | The guid representing the workspace identifier | 
WorkspaceId(String)
Returns a WorkspaceId using a String.
Declaration
public WorkspaceId(string value)Parameters
| Type | Name | Description | 
|---|---|---|
| String | value | The string representing the workspace identifier | 
Fields
None
Return the value of an identifier representing an invalid workspace id
Declaration
public static readonly WorkspaceId NoneField Value
| Type | Description | 
|---|---|
| WorkspaceId | 
Methods
Equals(Object)
Validate obj is a WorkspaceId instance and have 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(WorkspaceId)
Returns whether two WorkspaceId objects are equals.
Declaration
public readonly bool Equals(WorkspaceId other)Parameters
| Type | Name | Description | 
|---|---|---|
| WorkspaceId | other | 
Returns
| Type | Description | 
|---|---|
| Boolean | true if both instance have the same values; false otherwise. | 
GetHashCode()
Compute 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 WorkspaceId.
Declaration
public override readonly string ToString()Returns
| Type | Description | 
|---|---|
| String | The string result. | 
Overrides
Operators
Equality(WorkspaceId, WorkspaceId)
Get if two WorkspaceId represent the same.
Declaration
public static bool operator ==(WorkspaceId left, WorkspaceId right)Parameters
| Type | Name | Description | 
|---|---|---|
| WorkspaceId | left | Compare with this first instance. | 
| WorkspaceId | right | Compare with this other instance. | 
Returns
| Type | Description | 
|---|---|
| Boolean | 
Explicit(WorkspaceId to String)
Declaration
public static explicit operator string (WorkspaceId sId)Parameters
| Type | Name | Description | 
|---|---|---|
| WorkspaceId | sId | 
Returns
| Type | Description | 
|---|---|
| String | 
Inequality(WorkspaceId, WorkspaceId)
Get if two WorkspaceId does not represent the same.
Declaration
public static bool operator !=(WorkspaceId left, WorkspaceId right)Parameters
| Type | Name | Description | 
|---|---|---|
| WorkspaceId | left | Compare with this first instance. | 
| WorkspaceId | 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. |