示例#1
0
        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);
            }
        }
示例#2
0
        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);
                }
            }
        }
示例#3
0
        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);
            }
        }