docs.unity3d.com
    Show / Hide Table of Contents

    Struct SessionId

    Holds information about session identifier.

    Inherited Members
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.Cloud.Presence
    Syntax
    public readonly struct SessionId

    Constructors

    SessionId(Guid)

    Returns a SessionId using a Guid.

    Declaration
    public SessionId(Guid value)
    Parameters
    Type Name Description
    Guid value

    The guid representing the session identifier

    SessionId(String)

    Returns a SessionId using a String.

    Declaration
    public SessionId(string value)
    Parameters
    Type Name Description
    String value

    The string representing the session identifier

    Fields

    None

    Returns the value of an identifier representing an invalid session Id.

    Declaration
    public static readonly SessionId None
    Field Value
    Type Description
    SessionId

    Methods

    Equals(Object)

    Validates if obj is a SessionId 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
    ValueType.Equals(Object)

    Equals(SessionId)

    Returns whether two SessionId objects are equals.

    Declaration
    public readonly bool Equals(SessionId other)
    Parameters
    Type Name Description
    SessionId 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
    ValueType.GetHashCode()
    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()

    Gets the string representation of this SessionId.

    Declaration
    public override readonly string ToString()
    Returns
    Type Description
    String

    The string result.

    Overrides
    ValueType.ToString()

    Operators

    Equality(SessionId, SessionId)

    Gets whether two SessionId instances are the same.

    Declaration
    public static bool operator ==(SessionId left, SessionId right)
    Parameters
    Type Name Description
    SessionId left

    Compare with this first instance.

    SessionId right

    Compare with this other instance.

    Returns
    Type Description
    Boolean

    true if both instances represent the same; false otherwise.

    Explicit(SessionId to String)

    Declaration
    public static explicit operator string (SessionId sId)
    Parameters
    Type Name Description
    SessionId sId
    Returns
    Type Description
    String

    Inequality(SessionId, SessionId)

    Gets whether two SessionId instances are not the same.

    Declaration
    public static bool operator !=(SessionId left, SessionId right)
    Parameters
    Type Name Description
    SessionId left

    Compare with this first instance.

    SessionId 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.

    Extension Methods

    GenericDataExtensions.SerializeToByteArray(Object)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023