Example #1
0
        private void DeepClone(IContainer into, IContainer from, IFilterFactory factory)
        {
            //clone the subcontainers
            foreach (var container in from.GetSubContainers())
            {
                var subContainer = factory.CreateNewContainer();
                subContainer.Operation = container.Operation;
                into.AddChild(subContainer);

                DeepClone(subContainer, container, factory);
            }

            var wizard = new FilterImportWizard(BasicActivator);

            //clone the filters
            foreach (var filter in from.GetFilters())
            {
                into.AddChild(wizard.Import(into, filter));
            }
        }