예제 #1
0
 public PartyController(PartyConfiguration config)
 {
     _config = config;
     _fs     = new FileSystem();
     _http   = new HttpClient();
     _http.DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue("Party", Version));
 }
예제 #2
0
 public PartyController(PartyConfiguration config, ILogger logger, bool checksEnabled)
 {
     _config = config ?? throw new ArgumentNullException(nameof(config));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
     _fs     = new FileSystem();
     _http   = new HttpClient();
     _http.DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue("Party", Version));
     _folders = new FoldersHelper(_fs, _config.VirtAMate.VirtAMateInstallFolder, _config.VirtAMate.AllowedSubfolders, checksEnabled);
 }
 public IPartyController Create(PartyConfiguration config, ILogger logger, bool checksEnabled)
 {
     return(new PartyController(config, logger, checksEnabled));
 }