Пример #1
0
        public IEnumerable <IMiniButton> CreateForDiagramShape(IDiagramShapeUi diagramShapeUi)
        {
            if (!(diagramShapeUi is IDiagramNodeUi diagramNodeUi))
            {
                yield break;
            }

            yield return(new CloseMiniButtonViewModel(_modelEventSource, _diagramEventSource));

            foreach (var entityRelationType in _relatedNodeTypeProvider.GetRelatedNodeTypes(diagramNodeUi.DiagramNode.ModelNode.Stereotype))
            {
                yield return(new RelatedNodeMiniButtonViewModel(_modelEventSource, _diagramEventSource, entityRelationType));
            }
        }
Пример #2
0
 private IEnumerable <RelatedNodeType> GetRelatedNodeTypes() => _relatedNodeTypeProvider.GetRelatedNodeTypes(ModelNode.Stereotype);