Example #1
0
        public Library()
        {
            root = new ResultList("Test template", "", "testTemplace.zzz", 0, 0, ResultList.LibraryNodeType.Package);

            namespaceNode = new ResultList("ClassLibrary1", "", "Class1.cs", 7, 0, ResultList.LibraryNodeType.Namespaces);
            classNode = new ResultList("Class1", "ClassLibrary1.", "Class1.cs", 7, 17, ResultList.LibraryNodeType.Members);
            memberNode = new ResultList("GetBlaBlaBla", "ClassLibrary1.Class1.", "Class1.cs", 9, 22, ResultList.LibraryNodeType.Members);

            ModelReferenceList classReferenceNode = new ModelReferenceList(@"C:\temp\c1.cs", "test.", "test class reference", 5, 4);
            classNode.AddChild(classReferenceNode);

            MemberReferenceList methodReferenceNode = new MemberReferenceList(@"C:\temp\c22.cs", "test2.", "test member reference", 5, 4);
            memberNode.AddChild(methodReferenceNode);

            root.AddChild(memberNode);
            root.AddChild(classNode);
            root.AddChild(namespaceNode);

            objRoot = new ResultList(root);
            objRoot.Children.Clear();
            objRoot.Children.Add(new ResultList("ClassLibrary1", "", "Class1.cs", 7, 0, ResultList.LibraryNodeType.Namespaces));
            objRoot.Children[0].Children.Add(new ResultList("Class1", "ClassLibrary1.", "Class1.cs", 7, 17, ResultList.LibraryNodeType.Classes));
            objRoot.Children[0].Children[0].Children.Add(new ResultList("GetBlaBlaBla", "ClassLibrary1.Class1.", "Class1.cs", 9, 22, ResultList.LibraryNodeType.Members));

            //GetSupportedFileList();
        }
Example #2
0
        private void CreateSearchNodes()
        {
            // "flat" structure
            root = new SymbolNode("Test template", "", "testTemplace.zzz", 0, 0, SymbolNode.LibraryNodeType.Hierarchy);

            namespaceNode = new NamespaceNode("ClassLibrary1", "", "Class1.cs", 7, 0);
            classNode = new ModelNode("Class1", "ClassLibrary1.", "Class1.cs", 7, 17);
            memberNode = new MemberNode("GetBlaBlaBla", "ClassLibrary1.Class1.", "Class1.cs", 9, 22);

            ModelReferenceList
                classReferenceNode = new ModelReferenceList(
                    @"C:\Users\sivanov\Documents\Visual Studio 2010\Projects\ClassLibrary1\ClassLibrary1\Class1.cs - (8, 18) : public class Class1(NDjango symbol)",
                    @"C:\Users\sivanov\Documents\Visual Studio 2010\Projects\ClassLibrary1\ClassLibrary1\Class1.cs",
                    "", 8, 18),
                classReferenceNode1 = new ModelReferenceList(
                    @"C:\Users\sivanov\Documents\Visual Studio 2010\Projects\ClassLibrary1\ClassLibrary1\Class2.cs - (7, 13) : Class1 c1 = new Class1();(NDjango symbol)",
                    @"C:\Users\sivanov\Documents\Visual Studio 2010\Projects\ClassLibrary1\ClassLibrary1\Class2.cs",
                    "", 7, 13);
            classNode.AddChild(classReferenceNode);
            classNode.AddChild(classReferenceNode1);

            MemberReferenceList
                methodReferenceNode = new MemberReferenceList(
                    @"C:\Users\sivanov\Documents\Visual Studio 2010\Projects\ClassLibrary1\ClassLibrary1\Class1.cs - (10, 23) : public Class1 GetBlaBlaBla()(NDjango symbol)",
                    @"C:\Users\sivanov\Documents\Visual Studio 2010\Projects\ClassLibrary1\ClassLibrary1\Class1.cs",
                    "", 10, 23),
                methodReferenceNode1 = new MemberReferenceList(
                    @"C:\Users\sivanov\Documents\Visual Studio 2010\Projects\ClassLibrary1\ClassLibrary1\Class1.cs - (0, 0) : public Class1 GetBlaBlaBla()(NDjango symbol)",
                    @"C:\Users\sivanov\Documents\Visual Studio 2010\Projects\ClassLibrary1\ClassLibrary1\Class1.cs",
                    "", 0, 0),
                methodReferenceNode2 = new MemberReferenceList(
                    @"C:\Users\sivanov\Documents\Visual Studio 2010\Projects\ClassLibrary1\ClassLibrary1\Class1.cs - (0, 0) : public Class1 GetBlaBlaBla()(NDjango symbol)",
                    @"C:\Users\sivanov\Documents\Visual Studio 2010\Projects\ClassLibrary1\ClassLibrary1\Class1.cs",
                    "", 0, 0);

            memberNode.AddChild(methodReferenceNode);
            memberNode.AddChild(methodReferenceNode1);
            memberNode.AddChild(methodReferenceNode2);

            NamespaceReferenceList
                nsl1 = new NamespaceReferenceList(
                    @"C:\Users\sivanov\Documents\Visual Studio 2010\Projects\ClassLibrary1\ClassLibrary1\Class1.cs - (2, 2) (NDjango symbol)",
                    @"C:\Users\sivanov\Documents\Visual Studio 2010\Projects\ClassLibrary1\ClassLibrary1\Class1.cs",
                    "", 0, 0),
                nsl2 = new NamespaceReferenceList(
                    @"C:\Users\sivanov\Documents\Visual Studio 2010\Projects\ClassLibrary1\ClassLibrary1\Class2.cs - (3, 3) (NDjango symbol)",
                    @"C:\Users\sivanov\Documents\Visual Studio 2010\Projects\ClassLibrary1\ClassLibrary1\Class2.cs",
                    "", 0, 0);

            namespaceNode.AddChild(nsl1);
            namespaceNode.AddChild(nsl2);

            root.AddChild(memberNode);
            root.AddChild(classNode);
            root.AddChild(namespaceNode);
        }