protected override void VisitInternal(UmlDiagram diagram, UmlEntity info,
                                              UmlAddImplementedInterfacesToDiagramAttribute att)
        {
            var typesToAdd = info.Type.GetInterfaces();

            foreach (var type in typesToAdd)
            {
                diagram.UpdateTypeInfo(type, null);
            }
        }
コード例 #2
0
 protected override void VisitInternal(UmlDiagram diagram, UmlEntity info, UmlAddTypesToDiagramAttribute att)
 {
     if (att.Types == null || att.Types.Length == 0)
     {
         return;
     }
     foreach (var type in att.Types)
     {
         diagram.UpdateTypeInfo(type, null);
     }
 }
コード例 #3
0
        protected override void VisitInternal(UmlDiagram diagram, UmlEntity info, UmlAddRelationAttribute att)
        {
            var rel = new UmlRelation
            {
                Left  = new UmlRelationEnd(diagram.GetTypeName(info.Type)),
                Right = new UmlRelationEnd(diagram.GetTypeName(att.RelatedType)),
                Arrow = UmlRelationArrow.MkArrow(att, att.Multiple),
                Label = att.Name
            }
            .WitCreatorMeta <UmlAddRelationAttributeVisitor>(info.Type, att.RelatedType)
            .WithNote(att);

            rel.Tag = att.Tag;
            diagram.Relations.Add(rel);
            if (att.ForceAddToDiagram)
            {
                diagram.UpdateTypeInfo(att.RelatedType, null);
            }
        }