public void AddWithoutResolving(IConnectivityNode newNode) { if (!allNodes.ContainsKey(newNode)) { allNodes[newNode] = -1; } }
/// <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; } } }
/// <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); } }
/// <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); }
/// <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); }
/// <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); } }