src/sys/dotnet/perwapi/PERWAPI.cs
/// <summary>
/// Write out the scopes and the locals to the PDB file.
/// </summary>
/// <param name="symWriter">The symbol writer for this file.</param>
/// <param name="scope">The scope to write out.</param>
Write out the scopes and the locals to the PDB file.
Write out the scopes and the locals to the PDB file .
private void WriteScopeAndLocals(SymbolWriter symWriter, Scope scope)
        {
            symWriter.OpenScope(scope.OffsetStart);
            foreach (LocalBinding lb in scope.Locals) {
                symWriter.DefineLocalVariable2(
                    lb.Name,
                    0,
                    lb.Token.GetToken(),
                    1,
                    lb.Index,
                    0,
                    0,
                    lb.OffsetStart,
                    lb.OffsetEnd
                );
            }
            foreach (Scope childScope in scope.ChildScopes)
                WriteScopeAndLocals(symWriter, childScope);
            symWriter.CloseScope(scope.OffsetEnd);
        }
private void WriteScopeAndLocals ( SymbolWriter symWriter , Scope scope ) { symWriter . OpenScope ( scope . OffsetStart ) ; foreach ( LocalBinding lb in scope . Locals ) { symWriter . DefineLocalVariable2 ( lb . Name , 0 , lb . Token . GetToken ( ) , 1 , lb . Index , 0 , 0 , lb . OffsetStart , lb . OffsetEnd ) ; } foreach ( Scope childScope in scope . ChildScopes ) WriteScopeAndLocals ( symWriter , childScope ) ; symWriter . CloseScope ( scope . OffsetEnd ) ; }
Write out the scopes and the locals to the PDB file.
Write out the scopes and the locals to the PDB file .
// Open the scope // Add each local variable // 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 // Close the scope
symWriter
SymbolWriter
The symbol writer for this file.
The symbol writer for this file .
scope
Scope
The scope to write out.
The scope to write out .