Beispiel #1
0
        List <IUnresolvedTypeDefinition> SearchClasses(string text)
        {
            List <IUnresolvedTypeDefinition> list = new List <IUnresolvedTypeDefinition>();

            if (ProjectService.OpenSolution != null)
            {
                foreach (IProject project in ProjectService.OpenSolution.Projects)
                {
                    IProjectContent projectContent = project.ProjectContent;
                    if (projectContent != null)
                    {
                        foreach (IUnresolvedTypeDefinition c in projectContent.GetAllTypeDefinitions())
                        {
                            string className = c.Name;
                            if (className.Length >= text.Length)
                            {
                                if (GotoUtils.AutoCompleteWithCamelHumpsMatch(className, text))
                                {
                                    list.Add(c);
                                }
                            }
                        }
                    }
                }
            }
            return(list);
        }
Beispiel #2
0
        void AddAllExtensionMethodsMatchingText(string text)
        {
            List <IUnresolvedTypeDefinition> list = new List <IUnresolvedTypeDefinition>();

            if (ProjectService.OpenSolution != null)
            {
                foreach (IProject project in ProjectService.OpenSolution.Projects)
                {
                    IProjectContent projectContent = project.ProjectContent;
                    if (projectContent != null)
                    {
                        foreach (IUnresolvedTypeDefinition c in projectContent.GetAllTypeDefinitions())
                        {
                            AddAllExtensionMethodsMatchingText(c, text);
                        }
                    }
                }
            }
        }