예제 #1
0
        static void Main(string[] args)
        {
            /*
             * Some thoughts:
             * The stack trace does not bring property getters and setters.
             * There must be a way to filter out some tokens (don't find references for this tokens) to avoid paths that are too much common and pollute results
             */

            string fileName     = "";
            string solutionPath = "";

            string[] desiredNamespaces = new string[0];


            var solution = new SolutionExplorer(solutionPath);
            var doc      = solution.GetDocument(fileName);

            var rf      = solution.FindReferences(doc, desiredNamespaces, new int[] { 35 });
            var results = rf.Results;

            foreach (var result in results)
            {
                int i = 0;

                foreach (var current in result)
                {
                    if (i > 0)
                    {
                        Console.Write("-> ");
                    }

                    WriteStackItem(current);

                    i++;
                }

                Console.WriteLine(" ");
            }

            Console.ReadKey();
        }