예제 #1
0
        public ServerPackageRepository(
            ExpandedPackageRepository innerRepository,
            IServerPackageRepositoryConfig serverConfig)
        {
            if (innerRepository == null)
            {
                throw new ArgumentNullException("innerRepository");
            }
            _config = serverConfig;

            new DirectoryInfo(serverConfig.RootPath).Create();
            _fileSystem                = new PhysicalFileSystem(serverConfig.RootPath);
            _runBackgroundTasks        = serverConfig.RunBackgroundTasks;
            _expandedPackageRepository = innerRepository;

            _serverPackageStore = new ServerPackageStore(_fileSystem, Environment.MachineName.ToLowerInvariant() + ".cache.bin");
            _logger.InfoFormat("Initialized server package repository at {0}", serverConfig.RootPath);
        }
예제 #2
0
 public NuGetServerAutofacModule(IServerPackageRepositoryConfig serverConfig)
 {
     this.serverConfig = serverConfig ?? throw new System.ArgumentNullException(nameof(serverConfig));
 }
예제 #3
0
 public ExpandedPackageRepository(IServerPackageRepositoryConfig serverConfig)
     : this(new PhysicalFileSystem(serverConfig.RootPath))
 {
 }