private void DeleteRegisteredSources(ILocalNode existingNode)
{
// remove existing external source.
IEventSource eventSource = null;
SourceHandle handle = existingNode.Handle as SourceHandle;
if (handle != null)
{
eventSource = handle.Source as IEventSource;
if (eventSource != null)
{
m_eventSources.Remove(handle.Source);
}
}
// check if the node is a source itself.
eventSource = existingNode as IEventSource;
if (eventSource != null)
{
m_eventSources.Remove(existingNode);
}
}