private IClassification ClassificationFor(PartitionToken partition) { switch (partition.Type) { case PartitionTokenType.CommentBegin: case PartitionTokenType.CommentContents: case PartitionTokenType.CommentEnd: case PartitionTokenType.CommentLineBegin: case PartitionTokenType.CommentLineContents: case PartitionTokenType.CommentLineEnd: return _standardClassificationRegistry.Comment; case PartitionTokenType.StringBegin: case PartitionTokenType.StringContents: case PartitionTokenType.StringEnd: case PartitionTokenType.StringSingleBegin: case PartitionTokenType.StringSingleContents: case PartitionTokenType.StringSingleEnd: return _standardClassificationRegistry.String; } throw new ArgumentOutOfRangeException(); }
private IClassification ClassificationFor(PartitionToken partition) { switch (partition.Type) { case PartitionTokenType.CommentBegin: case PartitionTokenType.CommentContents: case PartitionTokenType.CommentEnd: case PartitionTokenType.CommentLineBegin: case PartitionTokenType.CommentLineContents: case PartitionTokenType.CommentLineEnd: return(_standardClassificationRegistry.Comment); case PartitionTokenType.StringBegin: case PartitionTokenType.StringContents: case PartitionTokenType.StringEnd: case PartitionTokenType.StringSingleBegin: case PartitionTokenType.StringSingleContents: case PartitionTokenType.StringSingleEnd: return(_standardClassificationRegistry.String); } throw new ArgumentOutOfRangeException(); }
private static TextSpan TextSpanForPartitionOfLine(ITextSnapshotLine line, PartitionToken partitionToken) { return(new TextSpan(line.Snapshot, new Span(line.Start + partitionToken.Begin, partitionToken.Length))); }
private static TextSpan TextSpanForPartitionOfLine(ITextSnapshotLine line, PartitionToken partitionToken) { return new TextSpan(line.Snapshot, new Span(line.Start + partitionToken.Begin, partitionToken.Length)); }