Exemplo n.º 1
0
        public static UmlRelationArrow MkArrow(BaseRelationAttribute att, bool isCollectionRelation)
        {
            var arrow = GetRelationByKind(att.Kind, isCollectionRelation)
                        .WithAttribute(att);

            return(arrow);
        }
Exemplo n.º 2
0
        public UmlRelationArrow WithAttribute(BaseRelationAttribute att)
        {
            if (att is null)
            {
                return(this);
            }
            if (att.ArrowDirection != UmlArrowDirections.Auto)
            {
                ArrowDirection = att.ArrowDirection;
            }
            ArrowLength = Math.Max(2, att.ArrowLength);
            if (att.LeftSign != ForceArrowEnd.NotSet)
            {
                LeftSign = (ArrowEnd)att.LeftSign;
            }
            if (att.RightSign != ForceArrowEnd.NotSet)
            {
                RightSign = (ArrowEnd)att.RightSign;
            }
            if (att.IsDotted != ChangeDecision.Auto)
            {
                IsDotted = att.IsDotted == ChangeDecision.Yes;
            }

            if (!string.IsNullOrEmpty(att.LeftSignDescription))
            {
                LeftSignDescription = att.LeftSignDescription;
            }

            if (!string.IsNullOrEmpty(att.RightSignDescription))
            {
                RightSignDescription = att.RightSignDescription;
            }

            if (!string.IsNullOrEmpty(att.Color))
            {
                Color = new UmlColor(att.Color);
            }


            return(this);
        }