3using System.Threading.Tasks;
25 this.reference = Reference;
35 return Grade.NotAtAll;
51 return this.
LoadGraph(Source, NullIfNotFound);
60 public async Task<ISemanticCube>
LoadGraph(Uri Source,
bool NullIfNotFound)
62 string[] Files = Directory.GetFiles(this.reference.Folder,
"*.*", SearchOption.TopDirectoryOnly);
66 foreach (
string FileName
in Files)
68 string Extension = Path.GetExtension(FileName);
76 if (Union is
null && !(Result is
null))
79 await Union.Add(Result);
96 await Union.Add(Model);
const string DefaultContentType
text/plain
Static class managing encoding and decoding of internet content.
static Task< object > DecodeAsync(string ContentType, byte[] Data, Encoding Encoding, KeyValuePair< string, string >[] Fields, Uri BaseUri)
Decodes an object.
static string GetContentType(string FileExtension)
Gets the content type of an item, given its file extension. It uses the TryGetContentType to see if a...
Static class managing loading of resources stored as embedded resources or in content files.
static async Task< byte[]> ReadAllBytesAsync(string FileName)
Reads a binary file asynchronously.
static async Task< InMemorySemanticCube > Create(ISemanticModel Model)
Creates an in-memory semantic cube from a semantic model.
Base class for all nodes in a parsed script tree.
Contains a reference to a graph in the graph store.
Graph source in the local graph store, based on files.
async Task< ISemanticCube > LoadGraph(Uri Source, bool NullIfNotFound)
Loads the graph
Grade Supports(Uri _)
How well a source with a given URI can be loaded by the class.
GraphStoreFileSource(GraphReference Reference)
Graph source in the local graph store, based on files.
Task< ISemanticCube > LoadGraph(Uri Source, ScriptNode Node, bool NullIfNotFound, RequestOrigin Caller)
Loads the graph
Tokens available in request.
Interface for semantic cubes.
Interface for semantic models.
Interface for graph sources.