Mono.Debugger.AssemblerMethod.AssemblerMethod C# (CSharp) Method

AssemblerMethod() public method

public AssemblerMethod ( Method method, AssemblerLine lines ) : System
method Method
lines AssemblerLine
return System
        public AssemblerMethod(Method method, AssemblerLine[] lines)
        {
            this.method = method;
            this.lines = lines;
            addresses = new ArrayList ();

            ArrayList contents = new ArrayList ();
            foreach (AssemblerLine line in lines) {
                if (line.Label != null) {
                    if (end_row > 0) {
                        contents.Add ("");
                        end_row++;
                    } else
                        start_row++;
                    contents.Add (String.Format ("{0}:", line.Label));
                    end_row++;
                }

                addresses.Add (new LineEntry (line.Address, 0, ++end_row));
                contents.Add (String.Format ("  {0:x}   {1}", line.Address, line.Text));
            }

            string[] text = new string [contents.Count];
            contents.CopyTo (text);

            buffer = new SourceBuffer (method.Name, text);
        }