C# Class CSMongo.MongoAdminDatabase

Creates a connection to the administrative database for the Mongo instance
Inheritance: IDisposable
Show file Open project: hugoware/CSMongo

Public Methods

Method Description
CheckOpLogging ( ) : MethodResult

Checks the status of the database for the oplogging value

CopyDatabase ( string from, string targetConnectionString ) : MethodResult

Handles copying a database to another location

CopyDatabase ( string from, string to, string host ) : MethodResult

Handles copying a database to another location

CopyDatabase ( string from, string to, string host, int port, string username, string password ) : MethodResult

Handles copying a database to another location

CopyDatabase ( string from, string to, string host, string username, string password ) : MethodResult

Handles copying a database to another location

Dispose ( ) : void

Handles cleaning up this database connection

FSync ( ) : FSyncResult

Performs an FSync command against the database

FSync ( bool async ) : FSyncResult

Performs an FSync command against the database

ForceError ( ) : ForceErrorResult

Causes an error on the server -- Uh... wut?

GetBuildInfo ( ) : BuildInfoResult

Returns the build info for the current database

GetDatabases ( ) : ListDatabasesResult

Gets a list of all databases available

GetLastError ( ) : GetLastErrorResult

Returns the most recent error from the server

GetOpTime ( ) : GetOpTimeResult

Returns the OpTime value from the server

GetPreviousError ( ) : GetPreviousErrorResult

Returns a previous error message from the server

Logout ( ) : void

Sends the log out request to the server

MongoAdminDatabase ( string connectionString ) : System

Creates access to the admin database using the provided information

MongoAdminDatabase ( string host, bool autoConnect ) : System

Creates access to the admin database using the provided information

MongoAdminDatabase ( string host, int port ) : System

Creates access to the admin database using the provided information

MongoAdminDatabase ( string host, int port, bool autoConnect ) : System

Creates access to the admin database using the provided information

MongoAdminDatabase ( string host, int port, string username, string password, bool autoConnect ) : System

Creates access to the admin database using the provided information

MongoAdminDatabase ( string host, string username, string password ) : System

Creates access to the admin database using the provided information

ResetErrors ( ) : MethodResult

Clears any errors from the server

RunCommand ( BsonObject arguments ) : MethodResult

Manually invokes a command against the database

RunCommand ( BsonObject arguments, bool expectResponse ) : MethodResult

Manually invokes a command against the database

RunCommand ( object arguments ) : MethodResult

Manually invokes a command against the database

RunCommand ( object arguments, bool expectResponse ) : MethodResult

Manually invokes a command against the database

Shutdown ( ) : void

Sends the shutdown signal to the database

Method Details

CheckOpLogging() public method

Checks the status of the database for the oplogging value
public CheckOpLogging ( ) : MethodResult
return CSMongo.Results.MethodResult

CopyDatabase() public method

Handles copying a database to another location
public CopyDatabase ( string from, string targetConnectionString ) : MethodResult
from string
targetConnectionString string
return CSMongo.Results.MethodResult

CopyDatabase() public method

Handles copying a database to another location
public CopyDatabase ( string from, string to, string host ) : MethodResult
from string
to string
host string
return CSMongo.Results.MethodResult

CopyDatabase() public method

Handles copying a database to another location
public CopyDatabase ( string from, string to, string host, int port, string username, string password ) : MethodResult
from string
to string
host string
port int
username string
password string
return CSMongo.Results.MethodResult

CopyDatabase() public method

Handles copying a database to another location
public CopyDatabase ( string from, string to, string host, string username, string password ) : MethodResult
from string
to string
host string
username string
password string
return CSMongo.Results.MethodResult

Dispose() public method

Handles cleaning up this database connection
public Dispose ( ) : void
return void

FSync() public method

Performs an FSync command against the database
public FSync ( ) : FSyncResult
return CSMongo.Results.FSyncResult

FSync() public method

Performs an FSync command against the database
public FSync ( bool async ) : FSyncResult
async bool
return CSMongo.Results.FSyncResult

ForceError() public method

Causes an error on the server -- Uh... wut?
public ForceError ( ) : ForceErrorResult
return CSMongo.Results.ForceErrorResult

GetBuildInfo() public method

Returns the build info for the current database
public GetBuildInfo ( ) : BuildInfoResult
return CSMongo.Results.BuildInfoResult

GetDatabases() public method

Gets a list of all databases available
public GetDatabases ( ) : ListDatabasesResult
return ListDatabasesResult

GetLastError() public method

Returns the most recent error from the server
public GetLastError ( ) : GetLastErrorResult
return GetLastErrorResult

GetOpTime() public method

Returns the OpTime value from the server
public GetOpTime ( ) : GetOpTimeResult
return CSMongo.Results.GetOpTimeResult

GetPreviousError() public method

Returns a previous error message from the server
public GetPreviousError ( ) : GetPreviousErrorResult
return CSMongo.Results.GetPreviousErrorResult

Logout() public method

Sends the log out request to the server
public Logout ( ) : void
return void

MongoAdminDatabase() public method

Creates access to the admin database using the provided information
public MongoAdminDatabase ( string connectionString ) : System
connectionString string
return System

MongoAdminDatabase() public method

Creates access to the admin database using the provided information
public MongoAdminDatabase ( string host, bool autoConnect ) : System
host string
autoConnect bool
return System

MongoAdminDatabase() public method

Creates access to the admin database using the provided information
public MongoAdminDatabase ( string host, int port ) : System
host string
port int
return System

MongoAdminDatabase() public method

Creates access to the admin database using the provided information
public MongoAdminDatabase ( string host, int port, bool autoConnect ) : System
host string
port int
autoConnect bool
return System

MongoAdminDatabase() public method

Creates access to the admin database using the provided information
public MongoAdminDatabase ( string host, int port, string username, string password, bool autoConnect ) : System
host string
port int
username string
password string
autoConnect bool
return System

MongoAdminDatabase() public method

Creates access to the admin database using the provided information
public MongoAdminDatabase ( string host, string username, string password ) : System
host string
username string
password string
return System

ResetErrors() public method

Clears any errors from the server
public ResetErrors ( ) : MethodResult
return CSMongo.Results.MethodResult

RunCommand() public method

Manually invokes a command against the database
public RunCommand ( BsonObject arguments ) : MethodResult
arguments BsonObject
return CSMongo.Results.MethodResult

RunCommand() public method

Manually invokes a command against the database
public RunCommand ( BsonObject arguments, bool expectResponse ) : MethodResult
arguments BsonObject
expectResponse bool
return CSMongo.Results.MethodResult

RunCommand() public method

Manually invokes a command against the database
public RunCommand ( object arguments ) : MethodResult
arguments object
return CSMongo.Results.MethodResult

RunCommand() public method

Manually invokes a command against the database
public RunCommand ( object arguments, bool expectResponse ) : MethodResult
arguments object
expectResponse bool
return CSMongo.Results.MethodResult

Shutdown() public method

Sends the shutdown signal to the database
public Shutdown ( ) : void
return void