コード例 #1
0
        private string generateRelationship(FCOConnection dst)
        {
            FCO           current = dst.Fco;
            string        relname = dst.Conn.className;
            StringBuilder inner   = new StringBuilder();

            inner.AppendFormat(FCO.Template.RelationshipInner, current.className, current.ProperClassName, current.memberType);
            if (current.HasChildren)
            {
                //and add all of the children
                foreach (DerivedWithKind child in current.ChildrenRecursive)
                {
                    if (child.Type == DerivedWithKind.InhType.General ||
                        child.Type == DerivedWithKind.InhType.Interface)
                    {
                        inner.AppendFormat(FCO.Template.RelationshipInner, child.Rel.className, child.Rel.ProperClassName, child.Rel.memberType);
                    }
                }
            }

            StringBuilder sb = new StringBuilder();

            sb.AppendFormat(FCO.Template.Relationship, current.className, relname, inner.ToString(), dst.DstOrSrc, dst.RoleName);

            return(sb.ToString());
        }
コード例 #2
0
        private string generateRelationshipForInterface(FCOConnection dst)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat(FCO.Template.RelationshipInterface, dst.Fco.className, dst.Conn.className, dst.DstOrSrc, dst.RoleName);

            return(sb.ToString());
        }