public Database() { string dbPath = Path.Combine(PathUtils.ConfigPath(), Resources.DBFileName); var database = new LiteDatabase(dbPath); Config = new ConfigOperations(database); SeedData(); }
public void SeedConfig(ConfigOperations config) { config.AddConfig(new ConfigEntity { ProtectMode = ProtectMode.SandboxAll, WhiteListExtensions = new List <string> { "txt", "mp3", "jpg", "png", } }); }
public TestContext(ILogTracer logTracer, IStorage storage, ICreds creds, string storagePrefix) { EntityConverter = new EntityConverter(); ServiceConfiguration = new TestServiceConfiguration(storagePrefix); Storage = storage; Creds = creds; Containers = new Containers(logTracer, Storage, Creds, ServiceConfiguration); Queue = new Queue(Storage, logTracer); RequestHandling = new RequestHandling(logTracer); TaskOperations = new TaskOperations(logTracer, this); NodeOperations = new NodeOperations(logTracer, this); JobOperations = new JobOperations(logTracer, this); NodeTasksOperations = new NodeTasksOperations(logTracer, this); TaskEventOperations = new TaskEventOperations(logTracer, this); NodeMessageOperations = new NodeMessageOperations(logTracer, this); ConfigOperations = new ConfigOperations(logTracer, this); PoolOperations = new PoolOperations(logTracer, this); ScalesetOperations = new ScalesetOperations(logTracer, this); UserCredentials = new UserCredentials(logTracer, ConfigOperations); }