PERWAPI.PDBWriter.WriteScopeAndLocals C# (CSharp) Метод

WriteScopeAndLocals() приватный Метод

Write out the scopes and the locals to the PDB file.
private WriteScopeAndLocals ( SymbolWriter symWriter, Scope scope ) : void
symWriter SymbolWriter The symbol writer for this file.
scope Scope The scope to write out.
Результат void
        private void WriteScopeAndLocals(SymbolWriter symWriter, Scope scope)
        {
            // Open the scope
            symWriter.OpenScope(scope.OffsetStart);

            // Add each local variable
            foreach (LocalBinding lb in scope.Locals) {
                symWriter.DefineLocalVariable2(
                    lb.Name,
                    0,
                    lb.Token.GetToken(),
                    1,
                    lb.Index,
                    0,
                    0,
                    lb.OffsetStart,
                    lb.OffsetEnd
                );
            }

            // Add each constants
            /* For now don't add constants.  Doesn't work. AKB 09-01-2007
            foreach (ConstantBinding cb in scope.Constants) {
                symWriter.DefineConstant(
                    cb.Name,
                    cb.Value,
                    cb.GetSig()
                );
            }
            */

            // Add any child scopes
            foreach (Scope childScope in scope.ChildScopes)
                WriteScopeAndLocals(symWriter, childScope);

            // Close the scope
            symWriter.CloseScope(scope.OffsetEnd);
        }