Table of Contents

Class EndPointHelper

Namespace
MongoDB.Driver.Core.Misc
Assembly
MongoDB.Driver.Core.dll

Represents helper methods for EndPoints.

public static class EndPointHelper
Inheritance
EndPointHelper
Inherited Members

Properties

EndPointEqualityComparer

Gets an end point equality comparer.

public static IEqualityComparer<EndPoint> EndPointEqualityComparer { get; }

Property Value

IEqualityComparer<EndPoint>

An end point equality comparer.

Methods

Contains(IEnumerable<EndPoint>, EndPoint)

Determines whether a list of end points contains a specific end point.

public static bool Contains(IEnumerable<EndPoint> endPoints, EndPoint endPoint)

Parameters

endPoints IEnumerable<EndPoint>

The list of end points.

endPoint EndPoint

The specific end point to search for.

Returns

bool

True if the list of end points contains the specific end point.

Equals(EndPoint, EndPoint)

Compares two end points.

public static bool Equals(EndPoint a, EndPoint b)

Parameters

a EndPoint

The first end point.

b EndPoint

The second end point.

Returns

bool

True if both end points are equal, or if both are null.

FromObjectData(List<object>)

Creates an end point from object data saved during serialization.

public static EndPoint FromObjectData(List<object> info)

Parameters

info List<object>

The object data.

Returns

EndPoint

An end point.

GetObjectData(EndPoint)

Gets the object data required to serialize an end point.

public static List<object> GetObjectData(EndPoint value)

Parameters

value EndPoint

The end point.

Returns

List<object>

The object data.

Parse(string)

Parses the string representation of an end point.

public static EndPoint Parse(string value)

Parameters

value string

The value to parse.

Returns

EndPoint

An end point.

SequenceEquals(IEnumerable<EndPoint>, IEnumerable<EndPoint>)

Compares two sequences of end points.

public static bool SequenceEquals(IEnumerable<EndPoint> a, IEnumerable<EndPoint> b)

Parameters

a IEnumerable<EndPoint>

The first sequence of end points.

b IEnumerable<EndPoint>

The second sequence of end points.

Returns

bool

True if both sequences contain the same end points in the same order, or if both sequences are null.

ToString(EndPoint)

Returns a string that represents the end point.

public static string ToString(EndPoint endPoint)

Parameters

endPoint EndPoint

The end point.

Returns

string

A string that represents the end point.

TryParse(string, out EndPoint)

Tries to parse the string representation of an end point.

public static bool TryParse(string value, out EndPoint result)

Parameters

value string

The value to parse.

result EndPoint

The result.

Returns

bool

True if the string representation was parsed successfully.