public override void Execute()
        {
            base.Execute();

            if (_host != null && _container == null)
            {
                _host.CreateRootContainerIfNotExists();
                _container = _host.RootFilterContainer;
            }

            if (_container == null)
            {
                throw new Exception("Container was null, either host failed to create or explicit null container was chosen");
            }

            var wizard = new FilterImportWizard(BasicActivator);
            var import = wizard.ImportOneFromSelection(_container, _filters);

            if (import != null)
            {
                _container.AddChild(import);
                Publish((DatabaseEntity)import);
                Emphasise((DatabaseEntity)import);
            }
        }
Exemplo n.º 2
0
        public override void Execute()
        {
            base.Execute();

            var f = (DatabaseEntity)_factory.CreateNewFilter("New Filter " + Guid.NewGuid());

            if (_host != null && _container == null)
            {
                if (_host.RootFilterContainer_ID == null)
                {
                    _host.CreateRootContainerIfNotExists();
                }

                _container = _host.RootFilterContainer;
            }

            if (_container != null)
            {
                _container.AddChild((IFilter)f);
            }

            Publish((DatabaseEntity)_container ?? f);
            Emphasise(f);
            Activate(f);
        }