public void TestSetup()
        {
            databaseConnection = new DatabaseConnectionMonitor(Properties.Settings.Default.TestDatabase);

            List <AgentDataModel> agents = databaseConnection.GetAgentsFromDatabase();

            if (agents.Count == 0)
            {
                databaseConnection.AddAgentToDatabase(agent, false, false);
            }
        }
Ejemplo n.º 2
0
 public SNMPController(string connectionString)
 {
     _databaseConnection = new DatabaseConnectionMonitor(connectionString);
 }
        public static void SaveExceptionToDB(string category, Exception exc)
        {
            DatabaseConnectionMonitor connectionManager = new DatabaseConnectionMonitor(Properties.Settings.Default.ProdDatabase);

            connectionManager.AddEventToDatabase(exc.GetType().ToString(), category, DateTime.Now, exc.HResult.ToString(), exc.Message, exc.StackTrace);
        }