コード例 #1
0
            public override bool Equals(object obj)
            {
                if (obj == null)
                {
                    return(false);
                }

                if (this.GetType() != obj.GetType())
                {
                    return(false);
                }

                ConnEndPoints other = (ConnEndPoints)obj;

                if (!object.Equals(src, other.src))
                {
                    return(false);
                }

                if (!object.Equals(dst, other.dst))
                {
                    return(false);
                }

                return(true);
            }
コード例 #2
0
        private string generateCurrentEndPointsForInterface(ConnEndPoints current)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat(Connection.Template.EndPointInterface, current.src.className, "Src");
            sb.AppendFormat(Connection.Template.EndPointInterface, current.dst.className, "Dst");

            return(sb.ToString());
        }
コード例 #3
0
        private string generateConnectForInterface(ConnEndPoints current)
        {
            StringBuilder sb = new StringBuilder();

            //sb.AppendFormat(Connection.Template.ConnectInterface,
            //    current.src.Name,
            //    current.dst.Name);

            return(sb.ToString());
        }
コード例 #4
0
        private string generateCurrentEndPoints(ConnEndPoints current)
        {
            StringBuilder sb = new StringBuilder();

            {
                StringBuilder inner = new StringBuilder();
                inner.AppendFormat(Connection.Template.EndPointInner, current.src.className, "src" /*Is it okay?*/, current.src.ProperClassName, current.src.memberType);
                if (current.src.HasChildren)
                {
                    //and add all of the children
                    foreach (DerivedWithKind child in current.src.ChildrenRecursive)
                    {
                        if (child.Type == DerivedWithKind.InhType.General)
                        {
                            inner.AppendFormat(Connection.Template.EndPointInner, child.Rel.className, "src", child.Rel.ProperClassName, child.Rel.memberType);
                        }
                    }
                }

                sb.AppendFormat(Connection.Template.EndPoint, current.src.className, "Src", inner.ToString(), "src");
            }
            {
                StringBuilder inner = new StringBuilder();
                inner.AppendFormat(Connection.Template.EndPointInner, current.dst.className, "dst" /*Is it okay?*/, current.dst.ProperClassName, current.dst.memberType);
                if (current.dst.HasChildren)
                {
                    //and add all of the children
                    foreach (DerivedWithKind child in current.dst.ChildrenRecursive)
                    {
                        if (child.Type == DerivedWithKind.InhType.General)
                        {
                            inner.AppendFormat(Connection.Template.EndPointInner, child.Rel.className, "dst", child.Rel.ProperClassName, child.Rel.memberType);
                        }
                    }
                }
                sb.AppendFormat(Connection.Template.EndPoint, current.dst.className, "Dst", inner.ToString(), "dst");
            }

            return(sb.ToString());
        }