src/sys/dotnet/perwapi/PERWAPI.cs
/// <summary>
/// Add a new sequnce point.
/// </summary>
/// <param name="sourceFile">The source file the sequence point is in.</param>
/// <param name="docLanguage">The language of the source file.</param>
/// <param name="langVendor">The language vendor of the source file.</param>
/// <param name="docType">The document type.</param>
/// <param name="offset">The offset of the sequence point.</param>
/// <param name="line">The starting line for the sequence point.</param>
/// <param name="col">The starting column for the sequence point.</param>
/// <param name="endLine">The ending line for the sequence point.</param>
/// <param name="endCol">The ending column for the sequence point.</param>
Add a new sequnce point.
Add a new sequnce point .
public void AddSequencePoint(string sourceFile, Guid docLanguage, Guid langVendor, Guid docType, uint offset, uint line, uint col, uint endLine, uint endCol) {
            Document sourceDoc = null;
            if (currentMethod == null)
                throw new Exception("You can not add sequence points before opening a method.");
            foreach (Document doc in _docWriters)
                if (sourceFile == doc._file && docLanguage == doc._docLanguage && langVendor == doc._langVendor && docType == doc._docType) {
                    sourceDoc = doc;
                    break;
                }
            if (sourceDoc == null) {
                sourceDoc = new Document();
                sourceDoc._file = sourceFile;
                sourceDoc._docLanguage = docLanguage;
                sourceDoc._langVendor = langVendor;
                sourceDoc._docType = docType;
                _docWriters.Add(sourceDoc);
            }
            SequencePointList spList = (SequencePointList)currentMethod.SequencePointList[sourceDoc];
            if (spList == null)
                currentMethod.SequencePointList.Add(sourceDoc, spList = new SequencePointList());
            spList.offsets.Add(offset);
            spList.lines.Add(line);
            spList.cols.Add(col);
            spList.endLines.Add(endLine);
            spList.endCols.Add(endCol);
        }
public void AddSequencePoint ( string sourceFile , Guid docLanguage , Guid langVendor , Guid docType , uint offset , uint line , uint col , uint endLine , uint endCol ) { Document sourceDoc = null ; if ( currentMethod == null ) throw new Exception ( " " ) ; foreach ( Document doc in _docWriters ) if ( sourceFile == doc . _file && docLanguage == doc . _docLanguage && langVendor == doc . _langVendor && docType == doc . _docType ) { sourceDoc = doc ; break ; } if ( sourceDoc == null ) { sourceDoc = new Document ( ) ; sourceDoc . _file = sourceFile ; sourceDoc . _docLanguage = docLanguage ; sourceDoc . _langVendor = langVendor ; sourceDoc . _docType = docType ; _docWriters . Add ( sourceDoc ) ; } SequencePointList spList = ( SequencePointList ) currentMethod . SequencePointList [ sourceDoc ] ; if ( spList == null ) currentMethod . SequencePointList . Add ( sourceDoc , spList = new SequencePointList ( ) ) ; spList . offsets . Add ( offset ) ; spList . lines . Add ( line ) ; spList . cols . Add ( col ) ; spList . endLines . Add ( endLine ) ; spList . endCols . Add ( endCol ) ; }
Add a new sequnce point.
Add a new sequnce point .
// Make sure we are in a method // Check if a reference for this source document already exists // If no existing document, create a new one
sourceFile
string
The source file the sequence point is in.
The source file the sequence point is in .
docLanguage
Guid
The language of the source file.
The language of the source file .
langVendor
Guid
The language vendor of the source file.
The language vendor of the source file .
docType
Guid
The document type.
The document type .
offset
uint
The offset of the sequence point.
The offset of the sequence point .
line
uint
The starting line for the sequence point.
The starting line for the sequence point .
col
uint
The starting column for the sequence point.
The starting column for the sequence point .
endLine
uint
The ending line for the sequence point.
The ending line for the sequence point .
endCol
uint
The ending column for the sequence point.
The ending column for the sequence point .