Class EndPointHelper
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
EndPointThe 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
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
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
EndPointThe end point.
Returns
Parse(string)
Parses the string representation of an end point.
public static EndPoint Parse(string value)
Parameters
value
stringThe 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
EndPointThe end point.
Returns
TryParse(string, out EndPoint)
Tries to parse the string representation of an end point.
public static bool TryParse(string value, out EndPoint result)
Parameters
Returns
- bool
True if the string representation was parsed successfully.