Ejemplo n.º 1
0
 public ModDb(ILogger logger, PatcherConfig configuration, string modsDirectory)
 {
     mLogger        = logger;
     mConfiguration = configuration;
     BaseDirectory  = modsDirectory;
     Initialize();
 }
Ejemplo n.º 2
0
        public Patcher(ILogger logger, PatcherConfig configuration, ModDb modDb)
        {
            mLogger        = logger;
            mConfiguration = configuration;
            mModDb         = modDb;

            mLogger.Information("Validating configuration");
            if (!ValidateConfig())
            {
                throw new ArgumentException("Invalid configuration", nameof(configuration));
            }

            mOutDir        = new DirectoryFileSystem(mLogger, mConfiguration.OutDir);
            mFilesDir      = new DirectoryFileSystem(mLogger, mConfiguration.FilesDir);
            mCacheFilesDir = new DirectoryFileSystem(mLogger, Path.GetFullPath(Path.Combine(mConfiguration.CacheDir, "files")));
            mBinDir        = new DirectoryFileSystem(mLogger, mConfiguration.BinDir);
        }