private async Task <IReadOnlyList <IDiagramNode> > ShowEntitiesAsync(IReadOnlyList <IRoslynModelNode> modelEntities, CancellationToken cancellationToken, IIncrementalProgress progress) { return(await Task.Run( () => DiagramServices.ShowModelNodes(modelEntities, cancellationToken, progress).ToArray(), cancellationToken)); }
private async Task <IReadOnlyList <IDiagramNode> > ExtendDiagramAsync(IRoslynModelNode modelNode, CancellationToken cancellationToken, IIncrementalProgress progress) { return(await Task.Run( () => DiagramServices.ShowModelNodeWithHierarchy(modelNode, cancellationToken, progress).ToArray(), cancellationToken)); }
public override async Task ExecuteAsync() { var modelEntity = await ModelServices.AddCurrentSymbolAsync(); if (modelEntity == null) { return; } var diagramNode = DiagramServices.ShowEntity(modelEntity); UiServices.ShowDiagramWindow(); UiServices.FollowDiagramNode(diagramNode); }
// GET: api/Diagram/5 public MindMapDto Get(string id) { var result = new DiagramServices().GetById(id); if (result == null) { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.NotFound) { Content = new StringContent(string.Format("Diagram with id = {0} not found", id)), ReasonPhrase = "Diagram ID Not Found" }); } return(result); }
private async Task <IReadOnlyList <IDiagramNode> > ExtendDiagramAsync(IRoslynBasedModelEntity modelEntity, CancellationToken cancellationToken, IIncrementalProgress progress) { return(await Task.Run(() => DiagramServices.ShowEntityWithHierarchy(modelEntity, cancellationToken, progress), cancellationToken)); }
public override async Task ExecuteAsync() { await UiService.ShowDiagramWindowAsync(); DiagramServices.ClearDiagram(); }
public override void Execute() { UiServices.ShowDiagramWindow(); DiagramServices.Clear(); }
private Task UpdateDiagramAsync(CancellationToken cancellationToken, IIncrementalProgress progress) { return(Task.Run(() => DiagramServices.UpdateFromSource(cancellationToken, progress), cancellationToken)); }