Struct DatasetId
Holds information about a dataset identifier.
Inherited Members
Namespace: Unity.Cloud.Common
Assembly: Unity.Cloud.Common.dll
Syntax
public readonly struct DatasetId
Constructors
DatasetId(Guid)
Declaration
public DatasetId(Guid value)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | value | The GUID that represents the dataset identifier |
DatasetId(string)
Declaration
public DatasetId(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | A string that represents the dataset identifier |
Fields
None
Returns the value of an identifier that represents an invalid dataset Id.
Declaration
public static readonly DatasetId None
Field Value
| Type | Description |
|---|---|
| DatasetId |
Methods
Equals(object)
Checks if obj is an DatasetId instance, and then compares the DatasetId value with the value of this instance.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | Compares values with this instance. |
Returns
| Type | Description |
|---|---|
| bool | true if both instances have the same values; false otherwise. |
Overrides
Equals(DatasetId)
Compares the values of DatasetId objects.
Declaration
public bool Equals(DatasetId other)
Parameters
| Type | Name | Description |
|---|---|---|
| DatasetId | other |
Returns
| Type | Description |
|---|---|
| bool | true if both instance have the same values; false otherwise. |
GetHashCode()
Computes a hash code for the object.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A hash code for the current object. |
Overrides
Remarks
- Important: Do not assume that equal hash codes imply object equality.
- Important: 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()
Gets the string for this DatasetId.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | The string result. |
Overrides
Operators
operator ==(DatasetId, DatasetId)
Checks whether two DatasetId are equal.
Declaration
public static bool operator ==(DatasetId left, DatasetId right)
Parameters
| Type | Name | Description |
|---|---|---|
| DatasetId | left | Compare with this first instance. |
| DatasetId | right | Compare with this other instance. |
Returns
| Type | Description |
|---|---|
| bool |
explicit operator string(DatasetId)
Declaration
public static explicit operator string(DatasetId dId)
Parameters
| Type | Name | Description |
|---|---|---|
| DatasetId | dId | Object to cast |
Returns
| Type | Description |
|---|---|
| string | The resulting string |
operator !=(DatasetId, DatasetId)
Checks whether two DatasetId aren't equal.
Declaration
public static bool operator !=(DatasetId left, DatasetId right)
Parameters
| Type | Name | Description |
|---|---|---|
| DatasetId | left | Compare with this first instance. |
| DatasetId | right | Compare with this other instance. |
Returns
| Type | Description |
|---|---|
| bool | true if both instances are not the same; false if both instances are the same. |