Emby Emby Emby BetaDev
  • Emby Home
  • Dev Home
  • Documentation
  • Reference
  • Download
Search Results for

    Show / Hide Table of Contents

    Struct HostIdentity

    Identifies a machine that processes can be run on: the local machine, or a remote host.

    Implements
    System.IEquatable<HostIdentity>
    Namespace: MediaBrowser.Model.System
    Assembly: MediaBrowser.Model.dll
    Syntax
    public readonly struct HostIdentity : IEquatable<HostIdentity>
    Remarks

    A remote host is identified by its Id, not by how it is reached: its address and port can change while it remains the same machine.

    Constructors

    HostIdentity(String)

    Initializes a new instance of the HostIdentity struct from the string form produced by ToString().

    Declaration
    public HostIdentity(string value)
    Parameters
    Type Name Description
    System.String value

    null or empty for the local host, ssh:<id> for a remote SSH host, with the id as a 12-digit hexadecimal Luid.

    Exceptions
    Type Condition
    System.FormatException

    value is not in one of the above forms.

    Properties

    Id

    Gets the id of a remote host, or an empty id for the local host.

    Declaration
    public readonly Luid Id { get; }
    Property Value
    Type Description
    Luid

    Local

    Gets the identity of the local host.

    Declaration
    public static readonly HostIdentity Local { get; }
    Property Value
    Type Description
    HostIdentity

    LocationType

    Gets where the host is located.

    Declaration
    public readonly HostLocationType LocationType { get; }
    Property Value
    Type Description
    HostLocationType

    Methods

    Equals(HostIdentity)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public readonly bool Equals(HostIdentity other)
    Parameters
    Type Name Description
    HostIdentity other

    An object to compare with this object.

    Returns
    Type Description
    System.Boolean

    true if the current object is equal to the other parameter; otherwise, false.

    Equals(Object)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override readonly bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj

    The object to compare with the current object.

    Returns
    Type Description
    System.Boolean

    true if the specified object is equal to the current object; otherwise, false.

    Overrides
    System.ValueType.Equals(System.Object)

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override readonly int GetHashCode()
    Returns
    Type Description
    System.Int32

    A hash code for the current object.

    Overrides
    System.ValueType.GetHashCode()

    RemoteSsh(Luid)

    Creates the identity of a remote SSH host.

    Declaration
    public static HostIdentity RemoteSsh(Luid id)
    Parameters
    Type Name Description
    Luid id

    The stable id of the remote host.

    Returns
    Type Description
    HostIdentity

    The remote host identity.

    ToString()

    Returns the string form that HostIdentity(String) accepts.

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

    An empty string for the local host, ssh:<id> for a remote SSH host.

    Overrides
    System.ValueType.ToString()

    Operators

    Equality(HostIdentity, HostIdentity)

    Returns a value that indicates whether the values of two HostIdentity objects are equal.

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

    The first value to compare.

    HostIdentity right

    The second value to compare.

    Returns
    Type Description
    System.Boolean

    true if the left and right parameters have the same value; otherwise, false.

    Inequality(HostIdentity, HostIdentity)

    Returns a value that indicates whether two HostIdentity objects have different values.

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

    The first value to compare.

    HostIdentity right

    The second value to compare.

    Returns
    Type Description
    System.Boolean

    true if left and right are not equal; otherwise, false.

    Implements

    System.IEquatable<T>

    Extension Methods

    Extensions.JsonClone<T>(T, IJsonSerializer)
    Extensions.JsonClone<T>(T, Type, IJsonSerializer)
    SDK
    On this Page
    Back to Top Copyright 2022 © EMBY LLC. Please see our terms of use and privacy policy.