示例#1
0
        public Program()
        {
            var regDlg = new RegistrationDialog(this);
            var fbDlg = new FeedbackDialog(this);
            var trainingsübersichtDlg = new TrainingsübersichtDialog(this);
            var trainingDlg = new TrainingDialog(this);
            var downloadDlg = new DownloadDialog(this);
            var rootDlg = new RootDialog(this);
            _repo = new MongoDbRepository(ConfigurationManager.AppSettings["MongoDbConnectionstring"]);

            new Application(regDlg, fbDlg, trainingsübersichtDlg, trainingDlg, downloadDlg, _repo);

            Get["/hello"] = _ => "Hello from instavote.application, " + DateTime.Now;
        }
示例#2
0
        public Program()
        {
            var regDlg = new RegistrationDialog(this);
            var fbDlg = new FeedbackDialog(this);
            var trainingsübersichtDlg = new TrainingsübersichtDialog(this);
            var trainingDlg = new TrainingDialog(this);
            var downloadDlg = new DownloadDialog(this);          
            var rootDlg = new RootDialog(this);
            _repo = new MongoDbRepository(CONNECTIONSTRING);

            new Application(regDlg, fbDlg, trainingsübersichtDlg, trainingDlg, downloadDlg, _repo);

            Get["/reset"] = _ => { ResetDb("xxx"); return this.SharedResponse; };

            Get["/hello"] = _ => "Hello from instavote.integration.tests, " + DateTime.Now;
        }