Ejemplo n.º 1
0
 /// <summary>
 /// For internal use only.  Adds <paramref name="newNode"/> to
 /// the network.  Assumes newNode is NOT already in the network.
 /// </summary>
 /// <param name="newNode">The new IBasicNode to add to the network</param>
 internal void AddNewNode(IBasicNode newNode)
 {
     _nodes.Add(newNode);
     if (NodeData != null)
         NodeData.AddRow(newNode);
     if (ChangeEventsEnabled)
     {
         var arg = new NetworkChangedEventArgs();
         arg.NodeAdded = newNode;
         OnNetworkChanged(arg);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// For Internal Use Only.  Sets the <see cref="Network"/>, <see cref="SourceNode"/>, <see cref="DestinationNode"/> 
 /// properties to null (safely).  Call when deleting the edge from a network.  *Note that 
 /// this does not delete the edge, but detatches it from other objects in the network.  *Note
 /// it does not call detach for each node at each end.
 /// * This sets index to -1
 /// </summary>
 public void Detatch()
 {
     // dont use properties as they guard agains null settings.
     _SourceNode = null;
     _DestinationNode = null;
     _Network = null;
     _Index = -1;
 }