コード例 #1
0
        public static SequencePoint[] GetSequencePoints(this ISymbolMethod method)
        {
            var offsets = new int[method.SequencePointCount];
            var documents = new ISymbolDocument[method.SequencePointCount];
            var lines = new int[method.SequencePointCount];
            var columns = new int[method.SequencePointCount];
            var endLines = new int[method.SequencePointCount];
            var endColumns = new int[method.SequencePointCount];

            var sequencePoints = new SequencePoint[method.SequencePointCount];

            method.GetSequencePoints(offsets, documents, lines, columns, endLines, endColumns);

            for (int i = 0; i < method.SequencePointCount; i++)
            {
                var location = new SourceLocation(documents[i].URL, lines[i], columns[i], endLines[i], endColumns[i]);

                sequencePoints[i] = new SequencePoint(offsets[i], location);
            }
            return sequencePoints;
        }
コード例 #2
0
 public UsesDateTimeNowViolation(Node node, SourceLocation? sourceLocation)
 {
     this.Node = node;
     this.SourceLocation = sourceLocation;
 }