C# Class MongoDB.Driver.Connection

Description of Connection.
Show file Open project: dannycoates/mongo-clr4-driver Class Usage Examples

Public Methods

Method Description
Authenticate ( string username, string password, string dbname ) : bool
Call ( Action msgWriter ) : ReplyMessage

Send a message to the server and receive a response

Close ( ) : void
Dispose ( ) : void
Say ( Action msgWriter, bool safe = false ) : void

Send a message to the server without receiving a response

Private Methods

Method Description
AddHost ( string name, int port ) : void
CheckIn ( System.Net.Sockets.Port port ) : void
CheckOut ( System.TimeSpan timeout ) : System.Net.Sockets.Port
Connection ( string host, int port, int min = 1, int max = 10 ) : System
Dispose ( bool disposing ) : void
Hash ( string username, string password ) : string
Open ( ) : void
WithPort ( Action action ) : void

Do something with a port, then return it to the queue

Method Details

Authenticate() public method

public Authenticate ( string username, string password, string dbname ) : bool
username string
password string
dbname string
return bool

Call() public method

Send a message to the server and receive a response
public Call ( Action msgWriter ) : ReplyMessage
msgWriter Action
return MongoDB.Driver.IO.ReplyMessage

Close() public method

public Close ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

Say() public method

Send a message to the server without receiving a response
public Say ( Action msgWriter, bool safe = false ) : void
msgWriter Action
safe bool if true, ensures the message executed without error on the server
return void