System.Reflection.Emit.SequencePointList.AddSequencePoint C# (CSharp) Method

AddSequencePoint() public method

public AddSequencePoint ( int offset, int line, int col, int endLine, int endCol ) : void
offset int
line int
col int
endLine int
endCol int
return void
		public void AddSequencePoint (int offset, int line, int col, int endLine, int endCol)
		{
			SequencePoint s = new SequencePoint ();
			s.Offset = offset;
			s.Line = line;
			s.Col = col;
			s.EndLine = endLine;
			s.EndCol = endCol;
			
			if (points == null) {
				points = new SequencePoint [arrayGrow];
			} else if (count >= points.Length) {
				SequencePoint[] temp = new SequencePoint [count + arrayGrow];
				Array.Copy (points, temp, points.Length);
				points = temp;
			}
			
			points [count] = s;
			count++;
		}
	}

Usage Example

Esempio n. 1
0
		public virtual void MarkSequencePoint (ISymbolDocumentWriter document, int startLine,
						       int startColumn, int endLine, int endColumn)
		{
			if (currentSequence == null || currentSequence.Document != document) {
				if (sequencePointLists == null)
					sequencePointLists = new ArrayList ();
				currentSequence = new SequencePointList (document);
				sequencePointLists.Add (currentSequence);
			}
			
			currentSequence.AddSequencePoint (code_len, startLine, startColumn, endLine, endColumn);
		}