Ejemplo n.º 1
0
        private IndexingTask createRemovalTask(long contentId)
        {
            var fileName  = _util.GetFileName("file");
            var rootEntry = new RootEntry <Metadata>(() => new Metadata(SequentialId.None));
            var fileEntry = (FileEntry <Metadata>)rootEntry.Add(EntryType.File, fileName, new Metadata(contentId));

            return(new IndexingTask(IndexingAction.RemoveContent, fileEntry, CancellationToken.None));
        }
Ejemplo n.º 2
0
        private IndexingTask createAdditionTaskForNewFile(long contentId, string content)
        {
            var fileName  = _util.CreateFile("file", content: content);
            var rootEntry = new RootEntry <Metadata>(() => new Metadata(SequentialId.None));
            var fileEntry = (FileEntry <Metadata>)rootEntry.Add(EntryType.File, fileName, new Metadata(contentId));

            var task = new IndexingTask(IndexingAction.AddContent, fileEntry, CancellationToken.None);

            return(task);
        }