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.6.0+Branch.origin/v2.6.x.Sha.593796a7b35dc59243383bcc684de296a5468f2e
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 (Inherited from Object.)
Public methodGetHashCode
Gets the hash code for this object.
(Overrides ObjectGetHashCode.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (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