MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.basecode.ConnectInfo Class Reference

The ConnectInfo class specifies the server, database and username/password used to connect to a database. More...

Public Types

enum  TYPE { NONE , LOCAL , REMOTE , AZURE }
 Defines the generic connection location More...
 

Public Member Functions

 ConnectInfo (string strServer=null, string strDb="DNN", string strUn=null, string strPw=null, TYPE location=TYPE.NONE)
 The constructor. More...
 
bool Compare (ConnectInfo ci)
 Compare another ConnectInfo with this one. More...
 
override string ToString ()
 Returns a string representation of the connection. More...
 
string ToString (string strAzure)
 Returns a string representation of the connection. More...
 
string ToInfoString ()
 Returns a string representation of the connection information. More...
 
string ToKeyValuePairs ()
 Returns the connection information as a set of key-value pairs. More...
 

Static Public Member Functions

static ConnectInfo ParseKeyValuePairs (string strKeyValPairs)
 Parses a key-value pair string containing the connection information and returns a ConnectInfo. More...
 

Properties

TYPE Location [getset]
 Get/set the generic location type. More...
 
string Server [getset]
 Get/set the server. More...
 
string Database [getset]
 Get/set the database. More...
 
string Username [get]
 Returns the username. More...
 
string Password [get]
 Returns the password. More...
 

Detailed Description

The ConnectInfo class specifies the server, database and username/password used to connect to a database.

Definition at line 13 of file ConnectInfo.cs.

Member Enumeration Documentation

◆ TYPE

Defines the generic connection location

Enumerator
NONE 

Specifies no location.

LOCAL 

Specifies a local connection.

REMOTE 

Specifies a remote connection.

AZURE 

Specifies a connection to Azure.

Definition at line 24 of file ConnectInfo.cs.

Constructor & Destructor Documentation

◆ ConnectInfo()

MyCaffe.basecode.ConnectInfo.ConnectInfo ( string  strServer = null,
string  strDb = "DNN",
string  strUn = null,
string  strPw = null,
TYPE  location = TYPE.NONE 
)

The constructor.

Parameters
strServerSpecifies the server (default = null)
strDbSpecifies the database (default = 'DNN')
strUnSpecifies the username (default = null)
strPwSpecifies the password (default = null)
locationSpecifies a generic location type.

Definition at line 52 of file ConnectInfo.cs.

Member Function Documentation

◆ Compare()

bool MyCaffe.basecode.ConnectInfo.Compare ( ConnectInfo  ci)

Compare another ConnectInfo with this one.

Parameters
ciSpecifies the other ConnectInfo to compare to.
Returns
If the two ConnectInfo settings are the same, true is returned, otherwise false.

Definition at line 66 of file ConnectInfo.cs.

◆ ParseKeyValuePairs()

static ConnectInfo MyCaffe.basecode.ConnectInfo.ParseKeyValuePairs ( string  strKeyValPairs)
static

Parses a key-value pair string containing the connection information and returns a ConnectInfo.

Parameters
strKeyValPairsSpecifies the key-value pairs string.
Returns
The new ConnectInfo object is returned with the connection information.

Definition at line 191 of file ConnectInfo.cs.

◆ ToInfoString()

string MyCaffe.basecode.ConnectInfo.ToInfoString ( )

Returns a string representation of the connection information.

Returns
The string representation is returned.

Definition at line 161 of file ConnectInfo.cs.

◆ ToKeyValuePairs()

string MyCaffe.basecode.ConnectInfo.ToKeyValuePairs ( )

Returns the connection information as a set of key-value pairs.

Returns
The key-value pair string is returned.

Definition at line 173 of file ConnectInfo.cs.

◆ ToString() [1/2]

override string MyCaffe.basecode.ConnectInfo.ToString ( )

Returns a string representation of the connection.

Returns
The string representation is returned.

Definition at line 90 of file ConnectInfo.cs.

◆ ToString() [2/2]

string MyCaffe.basecode.ConnectInfo.ToString ( string  strAzure)

Returns a string representation of the connection.

Parameters
strAzureSpecifies the Azure server.
Returns
The string representation is returned.

Definition at line 106 of file ConnectInfo.cs.

Property Documentation

◆ Database

string MyCaffe.basecode.ConnectInfo.Database
getset

Get/set the database.

Definition at line 135 of file ConnectInfo.cs.

◆ Location

TYPE MyCaffe.basecode.ConnectInfo.Location
getset

Get/set the generic location type.

Definition at line 117 of file ConnectInfo.cs.

◆ Password

string MyCaffe.basecode.ConnectInfo.Password
get

Returns the password.

Definition at line 152 of file ConnectInfo.cs.

◆ Server

string MyCaffe.basecode.ConnectInfo.Server
getset

Get/set the server.

Definition at line 126 of file ConnectInfo.cs.

◆ Username

string MyCaffe.basecode.ConnectInfo.Username
get

Returns the username.

Definition at line 144 of file ConnectInfo.cs.


The documentation for this class was generated from the following file: