protected Uri CreatePageUri(Uri baseAddress, string relativeAddress) { if (GraphPersistence != null) { return(GraphPersistence.CreatePageUri(baseAddress, relativeAddress)); } else { return(new Uri(baseAddress, relativeAddress + ".json")); } }
private async Task <IGraph> LoadGraph(Uri resourceUri, CancellationToken cancellationToken) { if (GraphPersistence != null) { return(await GraphPersistence.LoadGraph(resourceUri, cancellationToken)); } else { return(Utils.CreateGraph(resourceUri, await Storage.LoadStringAsync(resourceUri, cancellationToken))); } }
async Task <IGraph> LoadGraph(Uri resourceUri) { if (GraphPersistence != null) { return(await GraphPersistence.LoadGraph(resourceUri)); } else { return(Utils.CreateGraph(await Storage.LoadString(resourceUri))); } }
private async Task SaveGraph(Uri resourceUri, IGraph graph, Uri typeUri, CancellationToken cancellationToken) { if (GraphPersistence != null) { await GraphPersistence.SaveGraph(resourceUri, graph, typeUri, cancellationToken); } else { await Storage.SaveAsync(resourceUri, CreateIndexContent(graph, typeUri), cancellationToken); } }
async Task SaveGraph(Uri resourceUri, IGraph graph, Uri typeUri) { if (GraphPersistence != null) { await GraphPersistence.SaveGraph(resourceUri, graph, typeUri); } else { await Storage.Save(resourceUri, CreateIndexContent(graph, typeUri)); } }