Beispiel #1
0
 private async Task <IReadOnlyList <IDiagramNode> > ShowEntitiesAsync(IReadOnlyList <IRoslynModelNode> modelEntities,
                                                                      CancellationToken cancellationToken, IIncrementalProgress progress)
 {
     return(await Task.Run(
                () => DiagramServices.ShowModelNodes(modelEntities, cancellationToken, progress).ToArray(),
                cancellationToken));
 }
Beispiel #2
0
 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);
        }
Beispiel #4
0
        // 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);
        }
Beispiel #5
0
 private async Task <IReadOnlyList <IDiagramNode> > ExtendDiagramAsync(IRoslynBasedModelEntity modelEntity,
                                                                       CancellationToken cancellationToken, IIncrementalProgress progress)
 {
     return(await Task.Run(() => DiagramServices.ShowEntityWithHierarchy(modelEntity, cancellationToken, progress), cancellationToken));
 }
Beispiel #6
0
        public override async Task ExecuteAsync()
        {
            await UiService.ShowDiagramWindowAsync();

            DiagramServices.ClearDiagram();
        }
 public override void Execute()
 {
     UiServices.ShowDiagramWindow();
     DiagramServices.Clear();
 }
Beispiel #8
0
 private Task UpdateDiagramAsync(CancellationToken cancellationToken, IIncrementalProgress progress)
 {
     return(Task.Run(() => DiagramServices.UpdateFromSource(cancellationToken, progress), cancellationToken));
 }