コード例 #1
0
ファイル: ModDb.cs プロジェクト: TGEnigma/mkdd-patch
 public ModDb(ILogger logger, PatcherConfig configuration, string modsDirectory)
 {
     mLogger        = logger;
     mConfiguration = configuration;
     BaseDirectory  = modsDirectory;
     Initialize();
 }
コード例 #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);
        }