private void DataFlowManagerOnComponentAdded(object sender, DataFlowComponentEventArgs e) { IOutputFilterModuleInstance filter = e.Component as IOutputFilterModuleInstance; if (filter == null) { return; } lock (_updateLock) { _AddFilterInstance(filter); if (filter.Source != null) { // If we have a source, see if it is a parent output filter //If it is not a output filter, then we are a root node, otherwise we are some type of child IOutputFilterModuleInstance filterParent = filter.Source.Component as IOutputFilterModuleInstance; if (filterParent == null) { _AddRootNode(filter); } //_filterChildren.SetParent(filter, filterParent); } _AddDataModel(filter); } }
private void DataFlowManagerOnComponentSourceChanged(object sender, DataFlowComponentEventArgs e) { IOutputFilterModuleInstance filter = e.Component as IOutputFilterModuleInstance; if (filter == null) { return; } lock (_updateLock) { if (filter.Source != null) { IOutputFilterModuleInstance filterParent = filter.Source.Component as IOutputFilterModuleInstance; if (filterParent == null) { _AddRootNode(filter); } else { _RemoveFromRoots(filter); } _filterChildren.SetParent(filter, filterParent); } else { _RemoveFromRoots(filter); _filterChildren.SetParent(filter, null); } } }
private void DataFlowManagerOnComponentRemoved(object sender, DataFlowComponentEventArgs e) { IOutputFilterModuleInstance filter = e.Component as IOutputFilterModuleInstance; if (filter == null) { return; } lock (_updateLock) { _RemoveFilterInstance(filter); _RemoveFromRoots(filter); _RemoveDataModel(filter); } }