Couchbase .NET SDK __CB_SDK_VERSION__

Show / Hide Table of Contents

Struct HostEndpoint

Implements
IEquatable<HostEndpoint>
Inherited Members
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: Couchbase
Assembly: Couchbase.NetClient.dll
Syntax
public readonly struct HostEndpoint : IEquatable<HostEndpoint>

Constructors

View Source

HostEndpoint(string, int?)

Creates a new HostEndpoint.

Declaration
public HostEndpoint(string host, int? port)
Parameters
Type Name Description
string host

Host name or IP address. IPv6 addresses should be wrapped in square braces.

int? port

Port number, if any.

Properties

View Source

Host

Host name or IP address. IPv6 addresses should be wrapped in square braces.

Declaration
public string Host { get; }
Property Value
Type Description
string
View Source

Port

Port number, if any.

Declaration
public int? Port { get; }
Property Value
Type Description
int?

Methods

View Source

Deconstruct(out string)

Declaration
public void Deconstruct(out string host)
Parameters
Type Name Description
string host
View Source

Deconstruct(out string, out int?)

Declaration
public void Deconstruct(out string host, out int? port)
Parameters
Type Name Description
string host
int? port
View Source

Equals(HostEndpoint)

Declaration
public bool Equals(HostEndpoint other)
Parameters
Type Name Description
HostEndpoint other
Returns
Type Description
bool
View Source

Equals(object?)

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
ValueType.Equals(object)
View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
ValueType.GetHashCode()
View Source

Parse(string)

Parse a string in the format "server:11210" or "[::1]:11210". IPv6 addresses must be enclosed in square brackets.

Declaration
public static HostEndpoint Parse(string server)
Parameters
Type Name Description
string server

The server to parse.

Returns
Type Description
HostEndpoint

The HostEndpoint.

View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
ValueType.ToString()

Operators

View Source

operator ==(HostEndpoint, HostEndpoint)

Declaration
public static bool operator ==(HostEndpoint left, HostEndpoint right)
Parameters
Type Name Description
HostEndpoint left
HostEndpoint right
Returns
Type Description
bool
View Source

operator !=(HostEndpoint, HostEndpoint)

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

Implements

IEquatable<T>
  • View Source
In this article
Back to top Copyright © 2020 Couchbase, Inc. All rights reserved.