Click or drag to resize

MongoServerAddress Class

The address of a MongoDB server.
Inheritance Hierarchy
SystemObject
  MongoDB.DriverMongoServerAddress

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax
[SerializableAttribute]
public class MongoServerAddress : IEquatable<MongoServerAddress>

The MongoServerAddress type exposes the following members.

Constructors
  NameDescription
Public methodMongoServerAddress(String)
Initializes a new instance of MongoServerAddress.
Public methodMongoServerAddress(String, Int32)
Initializes a new instance of MongoServerAddress.
Top
Properties
  NameDescription
Public propertyHost
Gets the server's host name.
Public propertyPort
Gets the server's port number.
Top
Methods
  NameDescription
Public methodEquals(Object)
Compares two server addresses.
(Overrides ObjectEquals(Object).)
Public methodEquals(MongoServerAddress)
Compares two server addresses.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Gets the hash code for this object.
(Overrides ObjectGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberParse
Parses a string representation of a server address.
Public methodToString
Returns a string representation of the server address.
(Overrides ObjectToString.)
Public methodStatic memberTryParse
Tries to parse a string representation of a server address.
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Compares two server addresses.
Public operatorStatic memberInequality
Compares two server addresses.
Top
Extension Methods
  NameDescription
Public Extension MethodToBson
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.)
Top
See Also