Exemple #1
0
 public TextIndexer(DirectoryInfo baseDir, HttpLogger logger)
 {
     _baseDir       = baseDir;
     _logger        = logger;
     _indexes       = new Dictionary <string, AutoInvoker <IDocumentIndex> >();
     _deferredTasks = new DeferredExecution(x =>
     {
         Console.WriteLine(x.Message);
         return(true);
     });
 }
Exemple #2
0
        public RequestStore(DirectoryInfo baseDir, HttpLogger logger)
        {
            _baseDir = baseDir;

            if (!_baseDir.Exists)
            {
                _baseDir.Create();
            }

            _indexes = new Dictionary <string, AutoInvoker <IDocumentIndex> >();
            _logger  = logger;
        }
Exemple #3
0
        public RequestFeatureMap(DirectoryInfo baseDir, HttpLogger logger)
        {
            _logger       = logger;
            _dict         = new EnglishDictionary();
            _featureIndex = new FileInfo(Path.Combine(baseDir.FullName, "features.dat"));

            if (!_featureIndex.Directory.Exists)
            {
                _featureIndex.Directory.Create();
            }

            _featureIndexStream = new StreamWriter(new FileStream(_featureIndex.FullName, FileMode.OpenOrCreate, FileAccess.Write, FileShare.ReadWrite), Encoding.ASCII, 1024, false);
        }