Mono.Cecil.Pdb.PdbReader.Read C# (CSharp) Method

Read() public method

public Read ( MethodDefinition method ) : MethodDebugInformation
method MethodDefinition
return Mono.Cecil.Cil.MethodDebugInformation
        public MethodDebugInformation Read(MethodDefinition method)
        {
            var method_token = method.MetadataToken;

            PdbFunction function;
            if (!functions.TryGetValue (method_token.ToUInt32 (), out function))
                return null;

            var symbol = new MethodDebugInformation (method);

            ReadSequencePoints (function, symbol);

            if (!function.scopes.IsNullOrEmpty())
                symbol.scope = ReadScopeAndLocals (function.scopes [0], symbol);

            if (function.scopes.Length > 1) {
                for (int i = 1; i < function.scopes.Length; i++) {
                    var s = ReadScopeAndLocals (function.scopes [i], symbol);
                    if (!AddScope (symbol.scope.Scopes, s))
                        symbol.scope.Scopes.Add (s);
                }
            }

            return symbol;
        }