private static void TryInitialize(ShellSettings shellSettings) { if (shellSettings == null) { throw new ArgumentNullException("shellSettings"); } //We must initialize the logging subsystem first ConfigurateLogger(shellSettings); LoggerProvider.EnvironmentLogger.Info("The Logging Subsystem has been _initialized"); var env = new SlipstreamEnvironment(shellSettings); s_instance = env; s_instance._shellSettings = shellSettings; s_instance._initialized = true; LoggerProvider.EnvironmentLogger.Info(() => "Runtime environment successfully initialized."); }
public virtual void InitFramework() { var cfg = new ShellSettings(); cfg.DbName = TestingDatabaseName; if (!SlipstreamEnvironment.Initialized) { SlipstreamEnvironment.Initialize(cfg); } var service = SlipstreamEnvironment.RootService; var dbs = SlipstreamEnvironment.RootService.ListDatabases(); if (!dbs.Contains(TestingDatabaseName)) { var hashedRootPassword = SlipstreamEnvironment.Settings.ServerPassword.ToSha(); SlipstreamEnvironment.RootService.CreateDatabase(hashedRootPassword, TestingDatabaseName, "root"); } this.SessionToken = service.LogOn(TestingDatabaseName, "root", "root"); }