Mono.Cecil.Pdb.SymWriter.OpenScope C# (CSharp) Method

OpenScope() public method

public OpenScope ( int startOffset ) : int
startOffset int
return int
        public int OpenScope(int startOffset)
        {
            int result;
            m_writer.OpenScope (startOffset, out result);
            return result;
        }

Usage Example

Esempio n. 1
0
        public void Write(MethodBody body, /*Telerik Authorship*/ MetadataToken methodToken, /*Telerik Authorship*/ MetadataToken localVarToken)
        {
            /*Telerik Authorship*/
            //var method_token = body.Method.MetadataToken;
            var sym_token = new SymbolToken(methodToken.ToInt32());
            //var sym_token = new SymbolToken(body.Method.MetadataToken.ToInt32());

            var instructions = CollectInstructions(body);

            if (instructions.Count == 0)
            {
                return;
            }

            var start_offset = 0;
            var end_offset   = body.CodeSize;

            writer.OpenMethod(sym_token);
            writer.OpenScope(start_offset);

            DefineSequencePoints(instructions);

            /*Telerik Authorship*/
            Dictionary <VariableDefinition, string> methodVariableDefinitionToNameMap =
                GetMethodVariableDefinitionToNameMap(body.Method);

            DefineVariables(body, /*Telerik Authorship*/ localVarToken, /*Telerik Authorship*/ methodVariableDefinitionToNameMap, start_offset, end_offset);

            writer.CloseScope(end_offset);
            writer.CloseMethod();
        }
All Usage Examples Of Mono.Cecil.Pdb.SymWriter::OpenScope