Brunet.PathELManager.HandleEdge C# (CSharp) Method

HandleEdge() protected method

protected HandleEdge ( object newedge, System args ) : void
newedge object
args System
return void
    protected void HandleEdge(object newedge, System.EventArgs args) {
      Edge e = (Edge)newedge;
      try {
        e.CloseEvent += this.HandleEdgeClose;
        e.Subscribe(this, null);
        lock( _sync ) { 
          _edges.Add(e);
        }
      }
      catch(Exception x) {
        //Didn't work out, make sure the edges is closed
        Console.WriteLine("Closing ({0}) due to: {1}", e, x);
        e.Close();
      }
    }