public void Initialize(String host, String userId, String userPwd, String dbName)
{
if (_cancelTasks != null)
throw new AegisException(AegisResult.AlreadyInitialized);
// Connection Test
try
{
DBConnector dbc = new DBConnector();
dbc.Connect(host, userId, userPwd, dbName);
dbc.Close();
}
catch (Exception e)
{
throw new AegisException(AegisResult.MySqlConnectionFailed, e, "Invalid MySQL connection.");
}
HostAddress = host;
UserId = userId;
UserPwd = userPwd;
DBName = dbName;
_cancelTasks = new CancellationTokenSource();
}