示例#1
0
 public void AddWithoutResolving(IConnectivityNode newNode)
 {
     if (!allNodes.ContainsKey(newNode))
     {
         allNodes[newNode] = -1;
     }
 }
示例#2
0
 /// <summary>
 /// Adds the given element to the collection
 /// </summary>
 /// <param name="item">The item to add</param>
 public override void Add(IModelElement item)
 {
     if ((this._parent.ConnectivityNode == null))
     {
         IConnectivityNode connectivityNodeCasted = item.As <IConnectivityNode>();
         if ((connectivityNodeCasted != null))
         {
             this._parent.ConnectivityNode = connectivityNodeCasted;
             return;
         }
     }
 }
示例#3
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IConnectivityNode connectivityNodesCasted = item.As <IConnectivityNode>();

                if ((connectivityNodesCasted != null))
                {
                    this._parent.ConnectivityNodes.Add(connectivityNodesCasted);
                }
                ITopologicalNode topologicalNodeCasted = item.As <ITopologicalNode>();

                if ((topologicalNodeCasted != null))
                {
                    this._parent.TopologicalNode.Add(topologicalNodeCasted);
                }
            }
示例#4
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                if ((this._parent.ReportingGroup == item))
                {
                    this._parent.ReportingGroup = null;
                    return(true);
                }
                IConnectivityNode connectivityNodeItem = item.As <IConnectivityNode>();

                if (((connectivityNodeItem != null) &&
                     this._parent.ConnectivityNode.Remove(connectivityNodeItem)))
                {
                    return(true);
                }
                return(false);
            }
示例#5
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                IConnectivityNode connectivityNodeItem = item.As <IConnectivityNode>();

                if (((connectivityNodeItem != null) &&
                     this._parent.ConnectivityNodes.Remove(connectivityNodeItem)))
                {
                    return(true);
                }
                ITopologicalNode topologicalNodeItem = item.As <ITopologicalNode>();

                if (((topologicalNodeItem != null) &&
                     this._parent.TopologicalNode.Remove(topologicalNodeItem)))
                {
                    return(true);
                }
                return(false);
            }
示例#6
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                if ((this._parent.ReportingGroup == null))
                {
                    IReportingGroup reportingGroupCasted = item.As <IReportingGroup>();
                    if ((reportingGroupCasted != null))
                    {
                        this._parent.ReportingGroup = reportingGroupCasted;
                        return;
                    }
                }
                IConnectivityNode connectivityNodeCasted = item.As <IConnectivityNode>();

                if ((connectivityNodeCasted != null))
                {
                    this._parent.ConnectivityNode.Add(connectivityNodeCasted);
                }
            }