Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Builder builder = new Builder();

            builder.AddClassAnalysisPass(
                new AnalysisPasses.AddNodeClassPass());

            builder.AddInstructionAnalysisPass(
                new AnalysisPasses.InputFindingInstructionPass());

            // builder.AddInstructionAnalysisPass(
            //     new AnalysisPasses.PrintAllInstructionPass());
            // TODO: give real implementation!

            builder.AddInstructionAnalysisPass(
                new AnalysisPasses.PrintMethodInfoInstructionPass("System.Void FollowPlayer::OnCollisionEnter(UnityEngine.Collision)"));

            builder.AddInstructionAnalysisPass(
                new AnalysisPasses.FindNodeUsageInstructionPass());

            ClassGraph graph = builder.Build();

            Console.WriteLine(graph.ToString());

            // CecilTests("Assembly-CSharp.dll");
            // GraphTests();
        }