/// <summary> /// ctor for unit tests /// </summary> internal LocalPackageIndex(LuceneDirectory directory, IPackageSearchEngine engine, IReflectorFactory reflectorFactory, ILog logger) { _directory = directory; _engine = engine; _reflectorFactory = reflectorFactory; Logger = logger; }
public LocalPackageIndex(ILog logger = null) { Logger = logger; _location = Environment.ExpandEnvironmentVariables(DefaultIndexPath); if (!System.IO.Directory.Exists(_location)) { System.IO.Directory.CreateDirectory(_location); } _directory = FSDirectory.Open(_location); _engine = new PackageSearchEngine(IndexDirectory, Analyzer, Logger); }
public LocalPackageIndex(ILog logger = null) { Logger = logger; _location = Environment.ExpandEnvironmentVariables(DefaultIndexPath); if (!System.IO.Directory.Exists(_location)) { System.IO.Directory.CreateDirectory(_location); } _directory = FSDirectory.Open(_location); _engine = new PackageSearchEngine(IndexDirectory, Analyzer, Logger); _reflectorFactory = new RoslynReflectorFactory(); }