public MongoContentRepository(IMongoDatabase database, IAppProvider appProvider, IJsonSerializer serializer, ITextIndexer indexer, TypeNameRegistry typeNameRegistry) { Guard.NotNull(appProvider, nameof(appProvider)); Guard.NotNull(serializer, nameof(serializer)); Guard.NotNull(indexer, nameof(indexer)); Guard.NotNull(typeNameRegistry, nameof(typeNameRegistry)); this.appProvider = appProvider; this.indexer = indexer; this.serializer = serializer; typeAssetDeleted = typeNameRegistry.GetName <AssetDeleted>(); typeContentDeleted = typeNameRegistry.GetName <ContentDeleted>(); contents = new MongoContentCollection(database, serializer, appProvider); }
private NodeExpression(NodeExpression parent, IElement element, ITextIndexer textIndexer) { NodeType = textIndexer.GetIndex(element.TagName); Content = textIndexer.GetIndex(element.TextContent); Parent = parent; Element = element; var children = new NodeExpression[element.Children.Length]; for (int i = 0; i < element.Children.Length; i++) { children[i] = new NodeExpression(this, element.Children[i], textIndexer); } Children = children; _hash = $"[{NodeType}.{Content}.{string.Join(string.Empty, Children.Select(x => x.ToString()))}]"; }
public QueryContentsByQuery(IJsonSerializer serializer, ITextIndexer indexer) { this.serializer = serializer; this.indexer = indexer; }
public static NodeExpression Generate(IDocument element, ITextIndexer textIndexer) { return(new NodeExpression(null, element.Body, textIndexer)); }
public XmlSubsequenceAnalyser(ITextIndexer textIndexer) { this.textIndexer = textIndexer; }
public MongoContentRepository(IMongoDatabase database, IAppProvider appProvider, ITextIndexer indexer, IJsonSerializer serializer) : base(database) { Guard.NotNull(appProvider); Guard.NotNull(serializer); this.appProvider = appProvider; this.serializer = serializer; queryContentAsync = new QueryContent(serializer); queryContentsById = new QueryContentsByIds(serializer, appProvider); queryContentsByQuery = new QueryContentsByQuery(serializer, indexer); queryIdsAsync = new QueryIdsAsync(appProvider); queryScheduledItems = new QueryScheduledContents(); }