Struct Permission
This struct holds information about a permission.
Inherited Members
Namespace: Unity.Cloud.Common
Assembly: Unity.Cloud.Common.dll
Syntax
public readonly struct Permission
Constructors
Permission(string)
Creates a Permission using a string.
Declaration
public Permission(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | The string representing the permission |
Methods
Equals(object)
Validates that obj
is a Permission instance and that it has the same value 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 instances have the same values; false otherwise. |
Overrides
Equals(Permission)
Returns whether two Permission objects are equals.
Declaration
public bool Equals(Permission other)
Parameters
Type | Name | Description |
---|---|---|
Permission | other |
Returns
Type | Description |
---|---|
bool | true if both instances 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
- 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 Permission.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The string result. |
Overrides
Operators
operator ==(Permission, Permission)
Returns whether two Permission instances are equal.
Declaration
public static bool operator ==(Permission left, Permission right)
Parameters
Type | Name | Description |
---|---|---|
Permission | left | First instance. |
Permission | right | Second instance. |
Returns
Type | Description |
---|---|
bool |
explicit operator string(Permission)
Explicitly cast a Permission to a string
Declaration
public static explicit operator string(Permission permission)
Parameters
Type | Name | Description |
---|---|---|
Permission | permission | Object to cast |
Returns
Type | Description |
---|---|
string | The resulting string |
operator !=(Permission, Permission)
Returns whether two Permission instances are different.
Declaration
public static bool operator !=(Permission left, Permission right)
Parameters
Type | Name | Description |
---|---|---|
Permission | left | First instance. |
Permission | right | Second instance. |
Returns
Type | Description |
---|---|
bool |