Mono.CSharp.EmitContext.Mark C# (CSharp) Method

Mark() public method

This is called immediately before emitting an IL opcode to tell the symbol writer to which source line this opcode belongs.
public Mark ( Mono.CSharp.Location loc ) : void
loc Mono.CSharp.Location
return void
		public void Mark (Location loc)
		{
			if (!SymbolWriter.HasSymbolWriter || HasSet (Options.OmitDebugInfo) || loc.IsNull)
				return;

			SymbolWriter.MarkSequencePoint (ig, loc);
		}

Usage Example

Example #1
0
        public override void EmitStatement(EmitContext ec)
        {
            if (resolved == null)
            {
                return;
            }

            //
            // Emit sequence symbol info even if we are in compiler generated
            // block to allow debugging field initializers when constructor is
            // compiler generated
            //
            if (ec.HasSet(BuilderContext.Options.OmitDebugInfo) && ec.HasMethodSymbolBuilder)
            {
                using (ec.With(BuilderContext.Options.OmitDebugInfo, false)) {
                    ec.Mark(loc);
                }
            }

            if (resolved != this)
            {
                resolved.EmitStatement(ec);
            }
            else
            {
                base.EmitStatement(ec);
            }
        }
All Usage Examples Of Mono.CSharp.EmitContext::Mark