Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/CreateHiveDatabaseApplication.cs @ 4316

Last change on this file since 4316 was 4267, checked in by cneumuel, 14 years ago

renamed all database entities from "Client" to "Slave" (#1157)
made slave-heartbeats synchronous, also they send HBs when timetable disallows them to calculate. they will appear on the server as Idle bis IsAllowedToCalculate will be false (#1159)

File size: 848 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.PluginInfrastructure;
6using HeuristicLab.Hive.Server;
7using HeuristicLab.Hive.Server.DataAccess;
8using System.Windows.Forms;
9
10namespace HeuristicLab.Hive.Server.Core {
11  [Application("Create Hive Database", "Creates new empty Hive Database.", true)]
12  class CreateHiveDatabaseApplication : ApplicationBase {
13
14    public override void Run() {
15      IContextFactory contextFactory = ServiceLocator.GetContextFactory();
16      using (contextFactory.GetContext(false)) {
17        if (contextFactory.CurrentContext.DatabaseExists())
18          contextFactory.CurrentContext.DeleteDatabase();
19        contextFactory.CurrentContext.CreateDatabase();
20        MessageBox.Show("Creating Database finished.");
21      }
22    }
23  }
24}
Note: See TracBrowser for help on using the repository browser.