Beispiel #1
0
 public MethodContext(MethodData methodData, MethodInfo methodInfo, DebugMethod debugMethod, List <Node> nodes)
 {
     MethodData  = methodData;
     MethodInfo  = methodInfo;
     DebugMethod = debugMethod;
     this.nodes  = nodes;
 }
Beispiel #2
0
        private void ConstructNodeTree(IEnumerable <MethodData> methodData)
        {
            foreach (MethodData data in methodData)
            {
                foreach (MethodInfo info in data.methods)
                {
                    DebugMethod method = Helper.GetDebugMethod(info);

                    if (method == null)
                    {
                        continue;
                    }

                    var context = new MethodContext(data, info, method, nodes);

                    context.CreateNodes();
                }
            }

            // Sort nodes by name
            nodes.Sort((node1, node2) => string.Compare(node1.name, node2.name, StringComparison.Ordinal));

            // Sort base nodes based on priority
            nodes.Sort((node1, node2) => node2.priority.CompareTo(node1.priority));
        }