Beispiel #1
0
        /// <inheritdoc />
        public ResourceModel[] GetResources(ResourceQuery query)
        {
            var filter    = new ResourceQueryFilter(query, TypeTree);
            var resources = Graph.GetResources <Resource>(filter.Match).ToArray();

            var converter = new ResourceQueryConverter(TypeTree, Serialization, query);

            return(converter.QueryConversion(resources));
        }
Beispiel #2
0
 public ResourceQueryFilter(ResourceQuery query, IResourceTypeTree typeTree)
 {
     _query     = query;
     _typeNodes = query.Types?.Select(typeName => typeTree[typeName]).Where(t => t != null).ToArray();
 }