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);
73 byte[] Bin = await Runtime.IO.Files.ReadAllBytesAsync(FileName);
77 if (Union is
null && !(Result is
null))
80 await Union.Add(Result);
97 await Union.Add(Model);
const string DefaultContentType
text/plain
Contains information about a response to a content request.
object Decoded
Decoded object.
void AssertOk()
Asserts response is OK.
Static class managing encoding and decoding of internet content.
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 Task< ContentResponse > DecodeAsync(string ContentType, byte[] Data, Encoding Encoding, KeyValuePair< string, string >[] Fields, Uri BaseUri)
Decodes an object.
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.