Beispiel #1
0
        public LayerService(IEnumerable <ILayer> layers, string targetRoot)
        {
            this.layers = layers.ToDictionary(layer => layer.Id);
            mapper      = new PathMapper("", targetRoot);
            var rand = new Random();

            database   = new LiteDatabase($"{DateTime.Now.Ticks}.{rand.Next()}.db");
            collection = database.GetCollection <EntryDataDto>("entry");
            collection.DeleteAll();
        }
Beispiel #2
0
 public DirectoryLayer(string id, ILayerProvider provider, Mod mod, Link link, uint priority, bool writable = false)
 {
     Id                = id;
     Provider          = provider;
     this.mod          = mod;
     this.Link         = link;
     this.priority     = priority;
     this.writable     = writable;
     pathMapper        = new PathMapper(Path.Combine(mod.ModPath, link.ModPath), Path.Combine(mod.RootPath, link.TargetPath));
     rootDirectoryInfo = new DirectoryInfo(pathMapper.SourcePath);
 }