/// <exclude />
        public IEnumerable<Element> GetRoots(SearchToken searchToken)
        {
            NamespaceTreeBuilder builder = new NamespaceTreeBuilder(OnGetFunctionInfos(searchToken).Cast<INamespaceTreeBuilderLeafInfo>());

            bool hasChildren = (builder.RootFolder.SubFolders.Count != 0) || (builder.RootFolder.Leafs.Count != 0);

            Element element = new Element(_context.CreateElementHandle(new BaseFunctionFolderElementEntityToken(CreateId("", _context.ProviderName))))
                {
                    VisualData = new ElementVisualizedData()
                        {
                            Label = RootFolderLabel,
                            ToolTip = RootFolderToolTip,
                            HasChildren = hasChildren,
                            Icon = hasChildren ? this.FolderIcon : this.EmptyFolderIcon,
                            OpenedIcon = OpenFolderIcon
                        }
                };
            element.TreeLockBehavior = OnGetTreeLockBehavior();

            IEnumerable<ElementAction> actions = OnGetFolderActions();
            if (actions != null)
            {
                foreach (ElementAction action in actions)
                {
                    element.AddAction(action);
                }
            }

            return new List<Element> { element };
        }
        /// <exclude />
        public IEnumerable<Element> GetChildren(EntityToken entityToken, SearchToken searchToken)
        {
            BaseFunctionFolderElementEntityToken castedEntityToken = (BaseFunctionFolderElementEntityToken)entityToken;

            string id = castedEntityToken.Id;

            int index = castedEntityToken.Id.IndexOf('.');
            if (index != -1)
            {
                id = id.Remove(0, index + 1);
            }

            NamespaceTreeBuilder builder = new NamespaceTreeBuilder(OnGetFunctionInfos(searchToken).Cast<INamespaceTreeBuilderLeafInfo>());

            NamespaceTreeBuilderFolder folderNode;

            if (castedEntityToken.Id == CreateId("", _context.ProviderName))
            {
                folderNode = builder.RootFolder;
            }
            else
            {
                folderNode = builder.GetFolder(id);
            }

            List<Element> result = new List<Element>();
            if (searchToken == null)
            {
                if (folderNode != null)
                {
                    foreach (NamespaceTreeBuilderFolder node in folderNode.SubFolders.OrderBy(f => f.Name))
                    {
                        Element element = CreateFolderElement(node);
                        result.Add(element);
                    }

                    foreach (IFunctionTreeBuilderLeafInfo function in folderNode.Leafs)
                    {
                        Element element = CreateFunctionElement(function);

                        element.PropertyBag.Add("ElementType", "application/x-composite-function");
                        element.PropertyBag.Add("ElementId", IMetaFunctionExtensionMethods.CompositeName(function.Namespace, function.Name));

                        result.Add(element);
                    }
                }
            }
            else
            {
                if (folderNode != null)
                {
                    foreach (NamespaceTreeBuilderFolder node in folderNode.SubFolders.OrderBy(f => f.Name))
                    {
                        if (SubTreeContainsToken(node, searchToken))
                        {
                            Element element = CreateFolderElement(node);
                            result.Add(element);
                        }
                    }

                    foreach (IFunctionTreeBuilderLeafInfo function in folderNode.Leafs)
                    {
                        if (searchToken.Keyword == null || function.Name.Contains(searchToken.Keyword))
                        {
                            Element element = CreateFunctionElement(function);

                            element.PropertyBag.Add("ElementType", "application/x-composite-function");
                            element.PropertyBag.Add("ElementId", IMetaFunctionExtensionMethods.CompositeName(function.Namespace, function.Name));

                            result.Add(element);
                        }
                    }
                }
            }

            return result;
        }