Struct AssetVersion
This struct holds information about asset version identifier.
Inherited Members
Namespace: Unity.Cloud.Common
Assembly: Unity.Cloud.Common.dll
Syntax
public readonly struct AssetVersion
Constructors
AssetVersion(string)
Returns a AssetVersion using a string.
Declaration
public AssetVersion(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | The string representing the asset version |
Fields
None
Return the value of an identifier representing an invalid asset version
Declaration
public static readonly AssetVersion None
Field Value
Type | Description |
---|---|
AssetVersion |
Methods
Equals(object)
Validate obj
is a AssetVersion instance and have the same values as this instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | Compare the values with this instance. |
Returns
Type | Description |
---|---|
bool | true if both instance have the same values; false otherwise. |
Overrides
Equals(AssetVersion)
Returns whether two AssetVersion objects are equals.
Declaration
public bool Equals(AssetVersion other)
Parameters
Type | Name | Description |
---|---|---|
AssetVersion | other |
Returns
Type | Description |
---|---|
bool | true if both instance have the same values; false otherwise. |
GetHashCode()
Compute a hash code for the object.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | 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 AssetVersion.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The string result. |
Overrides
Operators
operator ==(AssetVersion, AssetVersion)
Get if two AssetVersion represent the same.
Declaration
public static bool operator ==(AssetVersion left, AssetVersion right)
Parameters
Type | Name | Description |
---|---|---|
AssetVersion | left | Compare with this first instance. |
AssetVersion | right | Compare with this other instance. |
Returns
Type | Description |
---|---|
bool |
explicit operator string(AssetVersion)
Explicitly cast a AssetVersion to a string>
Declaration
public static explicit operator string(AssetVersion a)
Parameters
Type | Name | Description |
---|---|---|
AssetVersion | a | Object to cast |
Returns
Type | Description |
---|---|
string | The resulting string |
operator !=(AssetVersion, AssetVersion)
Get if two AssetVersion does not represent the same.
Declaration
public static bool operator !=(AssetVersion left, AssetVersion right)
Parameters
Type | Name | Description |
---|---|---|
AssetVersion | left | Compare with this first instance. |
AssetVersion | 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. |