C# Class MongoDB.Azure.MongoHelper

显示文件 Open project: sridharn/Mongo-Azure

Public Methods

Method Description
GetMongoEndPoint ( ) : IPEndPoint

Get the end point associated with the mongod instance. If running with a warm standby instance it returns the endpoint on which mongod is actually listening.

GetMongoServer ( ) : MongoServer

Get an instance of MongoServer and connect to it. Uses default connection string of the form mongod://host:port. For other connection forms or options use GetMongoEndPoint and create your own connection

Private Methods

Method Description
CheckEndpoint ( IPEndPoint mongodEndpoint ) : bool

Method Details

GetMongoEndPoint() public static method

Get the end point associated with the mongod instance. If running with a warm standby instance it returns the endpoint on which mongod is actually listening.
public static GetMongoEndPoint ( ) : IPEndPoint
return System.Net.IPEndPoint

GetMongoServer() public static method

Get an instance of MongoServer and connect to it. Uses default connection string of the form mongod://host:port. For other connection forms or options use GetMongoEndPoint and create your own connection
public static GetMongoServer ( ) : MongoServer
return MongoServer