Ejemplo n.º 1
0
 /// <summary>
 /// Adds an input node to this node
 /// </summary>
 /// <param name="node">Input node to add</param>
 /// <exception cref="ArgumentNullException">Thrown if node is null</exception>
 /// <remarks>
 /// If the input node does not contain this node as an output, then this node is added to the
 /// input node (<see cref="AddOutputNode"/>)
 /// </remarks>
 public void AddInputNode( IGraphNode node )
 {
     if ( node == null )
     {
         throw new ArgumentNullException( "node" );
     }
     if ( !m_InputNodes.Contains( node ) )
     {
         m_InputNodes.Add( node );
         if ( InputNodeAdded != null )
         {
             InputNodeAdded( node );
         }
     }
     if ( !node.OutputNodes.Contains( this ) )
     {
         node.AddOutputNode( this );
     }
 }