Struct HostEndpoint
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
View Source
Port
Declaration
public int? Port { get; }
Property Value
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
View Source
Equals(HostEndpoint)
Declaration
public bool Equals(HostEndpoint other)
Parameters
Returns
View Source
Equals(object?)
Declaration
public override bool Equals(object? obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
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
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
View Source
operator ==(HostEndpoint, HostEndpoint)
Declaration
public static bool operator ==(HostEndpoint left, HostEndpoint right)
Parameters
Returns
View Source
operator !=(HostEndpoint, HostEndpoint)
Declaration
public static bool operator !=(HostEndpoint left, HostEndpoint right)
Parameters
Returns
Implements