885 references to FromBounds
Microsoft.AspNetCore.App.Analyzers (14)
Microsoft.AspNetCore.App.Analyzers.Test (1)
Microsoft.CodeAnalysis (15)
Microsoft.CodeAnalysis.CodeStyle (61)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (7)
122spans.Add(TextSpan.FromBounds(start, end));
296spans.Add(TextSpan.FromBounds(Math.Max(lastEnd, span1.Start), span1.End));
307spans.Add(TextSpan.FromBounds(Math.Max(lastEnd, span1.Start), span2.Start));
334spans.Add(TextSpan.FromBounds(Math.Max(lastEnd, span1.Start), span1.End));
568spans.Add(TextSpan.FromBounds(start, end));
611normalized.Add(TextSpan.FromBounds(oldStart, oldEnd));
621normalized.Add(TextSpan.FromBounds(oldStart, oldEnd));
Microsoft.CodeAnalysis.CodeStyle.Fixes (13)
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (8)
333edits.Add(new TextChange(TextSpan.FromBounds(startPos, startEnd), ""));
337edits.Add(new TextChange(TextSpan.FromBounds(firstMiddlePos, bottomEnd), ""));
346edits.Add(new TextChange(TextSpan.FromBounds(startPos, equalsEnd), ""));
350edits.Add(new TextChange(TextSpan.FromBounds(endPos, bottomEnd), ""));
359edits.Add(new TextChange(TextSpan.FromBounds(startPos, startEnd), ""));
365edits.Add(new TextChange(TextSpan.FromBounds(secondMiddlePos, equalsEnd), ""));
371edits.Add(new TextChange(TextSpan.FromBounds(firstMiddlePos, equalsEnd), ""));
376edits.Add(new TextChange(TextSpan.FromBounds(endPos, bottomEnd), ""));
Microsoft.CodeAnalysis.CSharp (13)
Microsoft.CodeAnalysis.CSharp.CodeStyle (36)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Indentation\CSharpSmartTokenFormatter.cs (2)
67_root, [TextSpan.FromBounds(startToken.SpanStart, endToken.Span.End)], _options.FormattingOptions, smartTokenformattingRules, cancellationToken);
121_root, [TextSpan.FromBounds(adjustedStartPosition, adjustedEndPosition)], _options.FormattingOptions, smartTokenFormattingRules, cancellationToken);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (10)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (24)
StringCopyPaste\StringInfo.cs (17)
98var contentSpans = ImmutableArray.Create(TextSpan.FromBounds(start, end));
104startDelimiterSpan: TextSpan.FromBounds(literal.SpanStart, start),
105endDelimiterSpan: TextSpan.FromBounds(end, literal.Span.End),
106endDelimiterSpanWithoutSuffix: TextSpan.FromBounds(end, endBeforeU8Suffix),
145TextSpan.FromBounds(literal.SpanStart, rawStart),
146TextSpan.FromBounds(rawEnd, literal.Span.End),
147TextSpan.FromBounds(rawEnd, endBeforeU8Suffix),
148contentSpans: [TextSpan.FromBounds(start, end)]);
175startDelimiterSpan: TextSpan.FromBounds(literal.SpanStart, start),
176endDelimiterSpan: TextSpan.FromBounds(end, literal.Span.End),
177endDelimiterSpanWithoutSuffix: TextSpan.FromBounds(end, endBeforeU8Suffix),
178[TextSpan.FromBounds(start, end)]);
209result.Add(TextSpan.FromBounds(currentPosition, content.SpanStart));
215result.Add(TextSpan.FromBounds(currentPosition, end));
219startDelimiterSpan: TextSpan.FromBounds(interpolatedString.SpanStart, interpolatedString.StringStartToken.Span.End),
220endDelimiterSpan: TextSpan.FromBounds(interpolatedString.StringEndToken.SpanStart, interpolatedString.Span.End),
221endDelimiterSpanWithoutSuffix: TextSpan.FromBounds(interpolatedString.StringEndToken.SpanStart, endBeforeU8Suffix),
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Features (100)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (16)
351ForEachPart.VariableDeclaration => TextSpan.FromBounds(node.Type.SpanStart, node.Identifier.Span.End),
361ForEachPart.VariableDeclaration => TextSpan.FromBounds(node.Variable.SpanStart, node.Variable.Span.End),
371SwitchExpressionPart.SwitchBody => TextSpan.FromBounds(node.SwitchKeyword.SpanStart, node.CloseBraceToken.Span.End),
1644return TextSpan.FromBounds(ns.NamespaceKeyword.SpanStart, ns.Name.Span.End);
1727return TextSpan.FromBounds(constraint.WhereKeyword.SpanStart, constraint.Constraints.Last().Span.End);
1768return TextSpan.FromBounds(usingStatement.UsingKeyword.SpanStart, usingStatement.CloseParenToken.Span.End);
1772return TextSpan.FromBounds(fixedStatement.FixedKeyword.SpanStart, fixedStatement.CloseParenToken.Span.End);
1776return TextSpan.FromBounds(lockStatement.LockKeyword.SpanStart, lockStatement.CloseParenToken.Span.End);
1799return TextSpan.FromBounds(ifStatement.IfKeyword.SpanStart, ifStatement.CloseParenToken.Span.End);
1806return TextSpan.FromBounds(switchStatement.SwitchKeyword.SpanStart,
1814return TextSpan.FromBounds(whileStatement.WhileKeyword.SpanStart, whileStatement.CloseParenToken.Span.End);
1821return TextSpan.FromBounds(forStatement.ForKeyword.SpanStart, forStatement.CloseParenToken.Span.End);
1826return TextSpan.FromBounds(
1940=> TextSpan.FromBounds((modifiers.Count != 0) ? modifiers.First().SpanStart : start.SpanStart, end.Span.End);
1943=> (first.Length > 0 && second.Length > 0) ? TextSpan.FromBounds(first.Start, second.End) : (first.Length > 0) ? first : (second.Length > 0) ? second : defaultSpan;
2695return TextSpan.FromBounds(
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (22)
SourceGeneration\GeneratorDriverTests.cs (19)
1219new[] { (gen001, TextSpan.FromBounds(2, 5)) },
1226new[] { (gen001, TextSpan.FromBounds(27, 30)) },
1240new[] { (gen001, TextSpan.FromBounds(34, 37)) },
1249new[] { (gen001, TextSpan.FromBounds(34, 37)), (gen001, TextSpan.FromBounds(77, 80)) },
3626location: Location.Create(syntaxTree, TextSpan.FromBounds(0, 2))));
3659location: Location.Create(validSyntaxTree, TextSpan.FromBounds(0, 2)),
3660additionalLocations: new[] { Location.Create(invalidSyntaxTree, TextSpan.FromBounds(0, 2)) }));
3690location: Location.Create(syntaxTree, TextSpan.FromBounds(0, 2))));
3720location: Location.Create(validSyntaxTree, TextSpan.FromBounds(0, 2)),
3721additionalLocations: new[] { Location.Create(invalidSyntaxTree, TextSpan.FromBounds(0, 2)) }));
3752location: Location.Create(syntaxTree, TextSpan.FromBounds(0, 100))));
3784location: Location.Create(syntaxTree, TextSpan.FromBounds(0, 2)),
3785additionalLocations: new[] { Location.Create(syntaxTree, TextSpan.FromBounds(0, 100)) }));
3815location: Location.Create(syntaxTree, TextSpan.FromBounds(0, 100))));
3844location: Location.Create(syntaxTree, TextSpan.FromBounds(0, 2)),
3845additionalLocations: new[] { Location.Create(syntaxTree, TextSpan.FromBounds(0, 100)) }));
3876location: Location.Create(syntaxTree, TextSpan.FromBounds(0, 2))));
3906location: Location.Create(syntaxTree, TextSpan.FromBounds(0, 2))));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Workspaces (29)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Indentation\CSharpSmartTokenFormatter.cs (2)
67_root, [TextSpan.FromBounds(startToken.SpanStart, endToken.Span.End)], _options.FormattingOptions, smartTokenformattingRules, cancellationToken);
121_root, [TextSpan.FromBounds(adjustedStartPosition, adjustedEndPosition)], _options.FormattingOptions, smartTokenFormattingRules, cancellationToken);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
Microsoft.CodeAnalysis.EditorFeatures (17)
CommentSelection\AbstractToggleBlockCommentBase.cs (11)
98var linesContainingSelection = TextSpan.FromBounds(firstLineAroundSelection, lastLineAroundSelection);
153var trackingSpan = TextSpan.FromBounds(intersectingBlockComments.First().Start, intersectingBlockComments.Last().End);
178spanToAdd = TextSpan.FromBounds(caretLocation, caretLocation);
205if (blockCommentSelection.IsSpanWhitespace(TextSpan.FromBounds(extent.Span.Start, extent.Span.End)))
293SelectedSpan = TextSpan.FromBounds(selectedSnapshotSpan.Start, selectedSnapshotSpan.End);
364var lineStartToCaretIsWhitespace = IsSpanWhitespace(TextSpan.FromBounds(selectedLine.Start, SelectedSpan.Start));
365var caretToLineEndIsWhitespace = IsSpanWhitespace(TextSpan.FromBounds(SelectedSpan.Start, selectedLine.End));
372if (IsSpanWhitespace(TextSpan.FromBounds(SelectedSpan.Start, blockComment.Start)))
382if (IsSpanWhitespace(TextSpan.FromBounds(blockComment.End, SelectedSpan.Start)))
415var possibleUncommentedSpan = TextSpan.FromBounds(spanStart, commentedSpan.Start);
429var uncommentedSpan = TextSpan.FromBounds(spanStart, SelectedSpan.End);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.EditorFeatures.Text (2)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (32)
CodeFixes\CodeFixServiceTests.cs (13)
59document, TextSpan.FromBounds(0, 0), new DefaultCodeActionRequestPriorityProvider(), CancellationToken.None);
86_ = await tuple.codeFixService.GetFixesAsync(document, TextSpan.FromBounds(0, 0), CancellationToken.None);
112var fixCollections = await tuple.codeFixService.GetFixesAsync(document, TextSpan.FromBounds(0, 0), CancellationToken.None);
143_ = await tuple.codeFixService.GetFixesAsync(document, TextSpan.FromBounds(0, 0),
150_ = await tuple.codeFixService.GetFixesAsync(document, TextSpan.FromBounds(0, 0),
179_ = await tuple.codeFixService.GetFixesAsync(document, TextSpan.FromBounds(0, 0),
209var fixCollectionSet = await tuple.codeFixService.GetFixesAsync(document, TextSpan.FromBounds(0, 0),
296var fixes = await tuple.codeFixService.GetFixesAsync(document, TextSpan.FromBounds(0, 0), CancellationToken.None);
321document, TextSpan.FromBounds(0, 0), new DefaultCodeActionRequestPriorityProvider(), CancellationToken.None);
563c.ReportDiagnostic(Diagnostic.Create(descriptor, c.Tree.GetLocation(TextSpan.FromBounds(0, 0))));
783return await fixService.GetFixesAsync(document, TextSpan.FromBounds(0, 0), CancellationToken.None);
884var txtDocumentCodeFixes = await tuple.codeFixService.GetFixesAsync(txtDocument, TextSpan.FromBounds(0, 1), CancellationToken.None);
901var logDocumentCodeFixes = await tuple.codeFixService.GetFixesAsync(logDocument, TextSpan.FromBounds(0, 1), CancellationToken.None);
CodeRefactorings\CodeRefactoringServiceTest.cs (7)
50var refactorings = await refactoringService.GetRefactoringsAsync(document, TextSpan.FromBounds(0, 0), CancellationToken.None);
88var refactorings = await refactoringService.GetRefactoringsAsync(document, TextSpan.FromBounds(0, 0), CancellationToken.None);
109var result = await refactoringService.GetRefactoringsAsync(document, TextSpan.FromBounds(0, 0), CancellationToken.None);
172var txtRefactorings = await refactoringService.GetRefactoringsAsync(txtAdditionalDocument, TextSpan.FromBounds(0, 0), CancellationToken.None);
187var logRefactorings = await refactoringService.GetRefactoringsAsync(logAdditionalDocument, TextSpan.FromBounds(0, 0), CancellationToken.None);
211var editorConfigRefactorings = await refactoringService.GetRefactoringsAsync(editorConfig, TextSpan.FromBounds(0, 0), CancellationToken.None);
226var globalConfigRefactorings = await refactoringService.GetRefactoringsAsync(globalConfig, TextSpan.FromBounds(0, 0), CancellationToken.None);
CommentSelection\CommentUncommentSelectionCommandHandlerTests.cs (3)
87CommentSelection(code, new[] { new TextChange(TextSpan.FromBounds(0, 0), "//") }, supportBlockComments: true);
127CommentSelection(code, new[] { new TextChange(TextSpan.FromBounds(0, 0), "//") }, supportBlockComments: false);
423CommentSelection(code, new[] { new TextChange(TextSpan.FromBounds(0, 0), "//") }, new[] { new Span(0, 15) }, supportBlockComments: true);
EditAndContinue\EditAndContinueLanguageServiceTests.cs (3)
163var documentDiagnostic = CodeAnalysis.Diagnostic.Create(diagnosticDescriptor1, Location.Create(syntaxTree, TextSpan.FromBounds(1, 2)), ["doc", "error 1"]);
165var syntaxError = CodeAnalysis.Diagnostic.Create(diagnosticDescriptor1, Location.Create(syntaxTree, TextSpan.FromBounds(1, 2)), ["doc", "syntax error 3"]);
166var rudeEditDiagnostic = new RudeEditDiagnostic(RudeEditKind.Delete, TextSpan.FromBounds(2, 3), arguments: ["x"]).ToDiagnostic(syntaxTree);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (4)
IntelliSense\SignatureHelpControllerTests.vb (2)
66.Returns(Task.FromResult(New SignatureHelpItems(CreateItems(2), TextSpan.FromBounds(0, 0), selectedItem:=0, semanticParameterIndex:=0, syntacticArgumentCount:=0, argumentName:=Nothing)))
213New SignatureHelpItems(_items, TextSpan.FromBounds(position, position), selectedItem:=0, semanticParameterIndex:=0, syntacticArgumentCount:=0, argumentName:=Nothing),
Microsoft.CodeAnalysis.Features (53)
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (8)
333edits.Add(new TextChange(TextSpan.FromBounds(startPos, startEnd), ""));
337edits.Add(new TextChange(TextSpan.FromBounds(firstMiddlePos, bottomEnd), ""));
346edits.Add(new TextChange(TextSpan.FromBounds(startPos, equalsEnd), ""));
350edits.Add(new TextChange(TextSpan.FromBounds(endPos, bottomEnd), ""));
359edits.Add(new TextChange(TextSpan.FromBounds(startPos, startEnd), ""));
365edits.Add(new TextChange(TextSpan.FromBounds(secondMiddlePos, equalsEnd), ""));
371edits.Add(new TextChange(TextSpan.FromBounds(firstMiddlePos, equalsEnd), ""));
376edits.Add(new TextChange(TextSpan.FromBounds(endPos, bottomEnd), ""));
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Microsoft.CodeAnalysis.Features.UnitTests (17)
EditAndContinue\ActiveStatementsMapTests.cs (8)
48var span = TextSpan.FromBounds(8, 11);
51TextSpan.FromBounds(1, 6), // does not overlap
52TextSpan.FromBounds(3, 9), // overlaps
53TextSpan.FromBounds(4, 5), // does not overlap
54TextSpan.FromBounds(6, 7), // does not overlap
55TextSpan.FromBounds(7, 9), // overlaps
56TextSpan.FromBounds(10, 12), // overlaps
57TextSpan.FromBounds(13, 15)); // does not overlap
EditAndContinue\RemoteEditAndContinueServiceTests.cs (3)
121var diagnostic = Diagnostic.Create(diagnosticDescriptor, Location.Create(syntaxTree, TextSpan.FromBounds(1, 1)));
199var documentDiagnostic = Diagnostic.Create(diagnosticDescriptor1, Location.Create(syntaxTree, TextSpan.FromBounds(1, 2)), new[] { "doc", "some error" });
201var syntaxError = Diagnostic.Create(diagnosticDescriptor1, Location.Create(syntaxTree, TextSpan.FromBounds(1, 2)), new[] { "doc", "syntax error" });
EditAndContinue\RudeEditDiagnosticTests.cs (4)
85var re = new RudeEditDiagnostic(kind, TextSpan.FromBounds(1, 2));
91var re = new RudeEditDiagnostic(kind, TextSpan.FromBounds(1, 2), syntaxNode, ["<1>", "<2>"]);
99var re = new RudeEditDiagnostic(kind, TextSpan.FromBounds(1, 2), syntaxNode, ["<1>", "<2>", "<3>"]);
108var re = new RudeEditDiagnostic(kind, TextSpan.FromBounds(1, 2), syntaxNode, ["<1>"]);
Microsoft.CodeAnalysis.LanguageServer.Protocol (4)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.UnitTests (5)
Microsoft.CodeAnalysis.VisualBasic (11)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (11)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (5)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (3)
Microsoft.CodeAnalysis.VisualBasic.Features (55)
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (10)
1257Return TextSpan.FromBounds(newWith.NewKeyword.Span.Start,
1289Return TextSpan.FromBounds(groupJoin.GroupKeyword.SpanStart, groupJoin.JoinKeyword.Span.End)
1304Return TextSpan.FromBounds(partition.SkipOrTakeKeyword.SpanStart, partition.WhileKeyword.Span.End)
1319Return TextSpan.FromBounds(ifKeyword.Span.Start,
1324Return TextSpan.FromBounds(node.NamespaceKeyword.SpanStart, node.Name.Span.End)
1334Return TextSpan.FromBounds(If(modifiers.Count <> 0, modifiers.First.SpanStart, start.SpanStart),
1399Return TextSpan.FromBounds(startToken.SpanStart, endToken.Span.End)
1412Return TextSpan.FromBounds(startToken.SpanStart, endToken.Span.End)
2135Return TextSpan.FromBounds(tryBlock.FinallyBlock.SpanStart, tryBlock.EndTryStatement.Span.End)
2138Return TextSpan.FromBounds(tryBlock.CatchBlocks.First().SpanStart, tryBlock.EndTryStatement.Span.End)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (19)
SourceGeneration\GeneratorDriverTests.vb (19)
224gen001, TextSpan.FromBounds(1, 4),
229gen001, TextSpan.FromBounds(19, 22),
239gen001, TextSpan.FromBounds(26, 29),
246gen001, TextSpan.FromBounds(60, 63),
312location:=Location.Create(syntaxTree, TextSpan.FromBounds(2, 4))))
343location:=Location.Create(validSyntaxTree, TextSpan.FromBounds(2, 4)),
344additionalLocations:={Location.Create(invalidSyntaxTree, TextSpan.FromBounds(2, 4))}))
374location:=Location.Create(syntaxTree, TextSpan.FromBounds(2, 4))))
404location:=Location.Create(validSyntaxTree, TextSpan.FromBounds(2, 4)),
405additionalLocations:={Location.Create(invalidSyntaxTree, TextSpan.FromBounds(2, 4))}))
434location:=Location.Create(syntaxTree, TextSpan.FromBounds(2, 100))))
464location:=Location.Create(syntaxTree, TextSpan.FromBounds(2, 4)),
465additionalLocations:={Location.Create(syntaxTree, TextSpan.FromBounds(2, 100))}))
495location:=Location.Create(syntaxTree, TextSpan.FromBounds(2, 100))))
524location:=Location.Create(syntaxTree, TextSpan.FromBounds(2, 4)),
525additionalLocations:={Location.Create(syntaxTree, TextSpan.FromBounds(2, 100))}))
554location:=Location.Create(syntaxTree, TextSpan.FromBounds(2, 4))))
584location:=Location.Create(syntaxTree, TextSpan.FromBounds(2, 4))))
703Return x.Diagnostic.WithLocation(Location.Create(syntaxTree, TextSpan.FromBounds(start, endpoint)))
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (4)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (18)
Microsoft.CodeAnalysis.Workspaces (70)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (7)
122spans.Add(TextSpan.FromBounds(start, end));
296spans.Add(TextSpan.FromBounds(Math.Max(lastEnd, span1.Start), span1.End));
307spans.Add(TextSpan.FromBounds(Math.Max(lastEnd, span1.Start), span2.Start));
334spans.Add(TextSpan.FromBounds(Math.Max(lastEnd, span1.Start), span1.End));
568spans.Add(TextSpan.FromBounds(start, end));
611normalized.Add(TextSpan.FromBounds(oldStart, oldEnd));
621normalized.Add(TextSpan.FromBounds(oldStart, oldEnd));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (170)
EditorConfigParsing\EditorConfigFileParserTests.cs (71)
32(string.Empty, TextSpan.FromBounds(0, 9), true),
33("*.cs", TextSpan.FromBounds(10, 19), false),
34("*.vb", TextSpan.FromBounds(20, 29), false),
35("*.{cs,vb}", TextSpan.FromBounds(30, 39), false),
36("*.{cs,csx,vb,vbx}", TextSpan.FromBounds(40, 49), false));
55(string.Empty, TextSpan.FromBounds(0, 9), true),
56("*.vb", TextSpan.FromBounds(20, 29), false),
57("*.{cs,vb}", TextSpan.FromBounds(30, 39), false),
58("*.{cs,csx,vb,vbx}", TextSpan.FromBounds(40, 49), false),
59("*s", TextSpan.FromBounds(50, 59), false),
60("*", TextSpan.FromBounds(60, 69), false),
61("*.{cs,csx}", TextSpan.FromBounds(70, 79), false));
70(string.Empty, TextSpan.FromBounds(0, 9), true),
71("*.vb", TextSpan.FromBounds(20, 29), false),
72("*.{cs,vb}", TextSpan.FromBounds(30, 39), false),
73("*.{cs,csx,vb,vbx}", TextSpan.FromBounds(40, 49), false),
74("*s", TextSpan.FromBounds(50, 59), false),
75("*", TextSpan.FromBounds(60, 69), false),
76("*.{cs,csx}", TextSpan.FromBounds(70, 79), false));
87(string.Empty, TextSpan.FromBounds(0, 9), true),
88("*.vb", TextSpan.FromBounds(20, 29), false),
89("*.{cs,csx,vb,vbx}", TextSpan.FromBounds(40, 49), false),
90("*s", TextSpan.FromBounds(50, 59), false),
91("*", TextSpan.FromBounds(60, 69), false),
92("*.{cs,csx}", TextSpan.FromBounds(70, 79), false));
111(string.Empty, TextSpan.FromBounds(0, 9), true),
112("*.cs", TextSpan.FromBounds(10, 19), false),
113("*.vb", TextSpan.FromBounds(20, 29), false),
114("*.{cs,vb}", TextSpan.FromBounds(30, 39), false),
115("*.{cs,csx,vb,vbx}", TextSpan.FromBounds(40, 49), false),
116("*s", TextSpan.FromBounds(50, 59), false),
117("*", TextSpan.FromBounds(60, 69), false),
118("*.{cs,csx}", TextSpan.FromBounds(70, 79), false));
133(string.Empty, TextSpan.FromBounds(0, 9), true),
134("sources/**/*.cs", TextSpan.FromBounds(10, 19), false),
135("sources/**/*.vb", TextSpan.FromBounds(20, 29), false),
136("*.{cs,vb}", TextSpan.FromBounds(30, 39), false),
137("*.{cs,csx,vb,vbx}", TextSpan.FromBounds(40, 49), false),
138("*s", TextSpan.FromBounds(50, 59), false),
139("*", TextSpan.FromBounds(60, 69), false),
140("*.{cs,csx}", TextSpan.FromBounds(70, 79), false));
150(string.Empty, TextSpan.FromBounds(0, 9), true),
151("sources/**/*.cs", TextSpan.FromBounds(10, 19), false),
152("sources/**/*.vb", TextSpan.FromBounds(20, 29), false),
153("*.{cs,vb}", TextSpan.FromBounds(30, 39), false),
154("*.{cs,csx,vb,vbx}", TextSpan.FromBounds(40, 49), false),
155("*s", TextSpan.FromBounds(50, 59), false),
156("*", TextSpan.FromBounds(60, 69), false),
157("*.{cs,csx}", TextSpan.FromBounds(70, 79), false));
172(string.Empty, TextSpan.FromBounds(0, 9), true),
173("*.{cs,csx,vbx}", TextSpan.FromBounds(30, 39), false),
174("*.{cs,csx,vb,vbx}", TextSpan.FromBounds(40, 49), false),
175("*s", TextSpan.FromBounds(50, 59), false),
176("*", TextSpan.FromBounds(60, 69), false));
191(string.Empty, TextSpan.FromBounds(0, 9), true),
192("*.*b", TextSpan.FromBounds(30, 39), false),
193("*.*b", TextSpan.FromBounds(80, 89), false),
194("*.*b", TextSpan.FromBounds(130, 139), false),
195("*.*s", TextSpan.FromBounds(40, 49), false),
196("*.*s", TextSpan.FromBounds(90, 99), false),
197("*.*s", TextSpan.FromBounds(120, 129), false),
198("*s", TextSpan.FromBounds(50, 59), false),
199("*s", TextSpan.FromBounds(100, 109), false),
200("*", TextSpan.FromBounds(60, 69), false),
201("*b", TextSpan.FromBounds(70, 79), false),
202("*b", TextSpan.FromBounds(110, 119), false));
217(string.Empty, TextSpan.FromBounds(0, 9), true),
218("*s", TextSpan.FromBounds(100, 109), false),
219("*", TextSpan.FromBounds(60, 69), false));
234(string.Empty, TextSpan.FromBounds(0, 9), true),
235("*s", TextSpan.FromBounds(100, 109), false));
EditorConfigParsing\NamingStyleParserTests.cs (48)
59Assert.Equal(TextSpan.FromBounds(2155, 2260), rule0.NamingScheme.OptionName.Span);
67Assert.Equal(TextSpan.FromBounds(2562, 2641), rule0.NamingScheme.Capitalization.Span);
70Assert.Equal(TextSpan.FromBounds(2338, 2481), rule0.ApplicableSymbolInfo.Accessibilities.Span);
77Assert.Equal(TextSpan.FromBounds(2338, 2481), rule0.ApplicableSymbolInfo.Accessibilities.Span);
80Assert.Equal(TextSpan.FromBounds(2483, 2558), rule0.ApplicableSymbolInfo.Modifiers.Span);
83Assert.Equal(TextSpan.FromBounds(2338, 2481), rule0.ApplicableSymbolInfo.Accessibilities.Span);
86Assert.Equal(TextSpan.FromBounds(1961, 2049), rule0.Severity.Span);
94Assert.Equal(TextSpan.FromBounds(5078, 5149), rule1.NamingScheme.OptionName.Span);
102Assert.Equal(TextSpan.FromBounds(5236, 5300), rule1.NamingScheme.Capitalization.Span);
105Assert.Equal(TextSpan.FromBounds(4998, 5076), rule1.ApplicableSymbolInfo.OptionName.Span);
120Assert.Equal(TextSpan.FromBounds(5153, 5232), rule1.ApplicableSymbolInfo.SymbolKinds.Span);
123Assert.Equal(TextSpan.FromBounds(4928, 4996), rule1.Severity.Span);
132Assert.Equal(TextSpan.FromBounds(5925, 5999), rule2.NamingScheme.OptionName.Span);
140Assert.Equal(TextSpan.FromBounds(6061, 6127), rule2.NamingScheme.Capitalization.Span);
143Assert.Equal(TextSpan.FromBounds(5853, 5923), rule2.ApplicableSymbolInfo.OptionName.Span);
170Assert.Equal(TextSpan.FromBounds(6003, 6057), rule2.ApplicableSymbolInfo.SymbolKinds.Span);
173Assert.Equal(TextSpan.FromBounds(5781, 5851), rule2.Severity.Span);
181Assert.Equal(TextSpan.FromBounds(2891, 3000), rule3.NamingScheme.OptionName.Span);
189Assert.Equal(TextSpan.FromBounds(3310, 3391), rule3.NamingScheme.Capitalization.Span);
192Assert.Equal(TextSpan.FromBounds(2783, 2889), rule3.ApplicableSymbolInfo.OptionName.Span);
199Assert.Equal(TextSpan.FromBounds(3080, 3225), rule3.ApplicableSymbolInfo.Accessibilities.Span);
202Assert.Equal(TextSpan.FromBounds(3227, 3306), rule3.ApplicableSymbolInfo.Modifiers.Span);
205Assert.Equal(TextSpan.FromBounds(3004, 3078), rule3.ApplicableSymbolInfo.SymbolKinds.Span);
208Assert.Equal(TextSpan.FromBounds(2691, 2781), rule3.Severity.Span);
216Assert.Equal(TextSpan.FromBounds(5502, 5587), rule4.NamingScheme.OptionName.Span);
224Assert.Equal(TextSpan.FromBounds(5666, 5735), rule4.NamingScheme.Capitalization.Span);
227Assert.Equal(TextSpan.FromBounds(5418, 5500), rule4.ApplicableSymbolInfo.OptionName.Span);
241Assert.Equal(TextSpan.FromBounds(5591, 5662), rule4.ApplicableSymbolInfo.SymbolKinds.Span);
244Assert.Equal(TextSpan.FromBounds(5338, 5416), rule4.Severity.Span);
252Assert.Equal(TextSpan.FromBounds(3569, 3642), rule5.NamingScheme.OptionName.Span);
260Assert.Equal(TextSpan.FromBounds(3773, 3836), rule5.NamingScheme.Capitalization.Span);
263Assert.Equal(TextSpan.FromBounds(3497, 3567), rule5.ApplicableSymbolInfo.OptionName.Span);
275Assert.Equal(TextSpan.FromBounds(3711, 3769), rule5.ApplicableSymbolInfo.Modifiers.Span);
279Assert.Equal(TextSpan.FromBounds(3646, 3709), rule5.ApplicableSymbolInfo.SymbolKinds.Span);
282Assert.Equal(TextSpan.FromBounds(3423, 3495), rule5.Severity.Span);
290Assert.Equal(TextSpan.FromBounds(4601, 4685), rule6.NamingScheme.OptionName.Span);
292Assert.Equal(TextSpan.FromBounds(4825, 4885), rule6.NamingScheme.Prefix.Span);
298Assert.Equal(TextSpan.FromBounds(4755, 4823), rule6.NamingScheme.Capitalization.Span);
301Assert.Equal(TextSpan.FromBounds(4518, 4599), rule6.ApplicableSymbolInfo.OptionName.Span);
315Assert.Equal(TextSpan.FromBounds(4689, 4751), rule6.ApplicableSymbolInfo.SymbolKinds.Span);
318Assert.Equal(TextSpan.FromBounds(4439, 4516), rule6.Severity.Span);
326Assert.Equal(TextSpan.FromBounds(4045, 4125), rule7.NamingScheme.OptionName.Span);
328Assert.Equal(TextSpan.FromBounds(4326, 4385), rule7.NamingScheme.Prefix.Span);
334Assert.Equal(TextSpan.FromBounds(4258, 4324), rule7.NamingScheme.Capitalization.Span);
337Assert.Equal(TextSpan.FromBounds(3966, 4043), rule7.ApplicableSymbolInfo.OptionName.Span);
349Assert.Equal(TextSpan.FromBounds(4191, 4254), rule7.ApplicableSymbolInfo.Modifiers.Span);
352Assert.Equal(TextSpan.FromBounds(4129, 4189), rule7.ApplicableSymbolInfo.SymbolKinds.Span);
355Assert.Equal(TextSpan.FromBounds(3889, 3964), rule7.Severity.Span);
Shared\Extensions\TextSpanExtensions\SubtractTests.cs (50)
28private static TextSpan LongSpan { get; } = TextSpan.FromBounds(10, 20);
29private static TextSpan UnitSpan { get; } = TextSpan.FromBounds(10, 11);
30private static TextSpan EmptySpan { get; } = TextSpan.FromBounds(10, 10);
44LongSpan.Subtract(TextSpan.FromBounds(RightBeforeStart(LongSpan), RightBeforeStart(LongSpan))));
52LongSpan.Subtract(TextSpan.FromBounds(RightBeforeStart(LongSpan), AtStart(LongSpan))));
59[TextSpan.FromBounds(RightAfterStart(LongSpan), AtEnd(LongSpan))],
60LongSpan.Subtract(TextSpan.FromBounds(RightBeforeStart(LongSpan), RightAfterStart(LongSpan))));
67[TextSpan.FromBounds(RightBeforeEnd(LongSpan), AtEnd(LongSpan))],
68LongSpan.Subtract(TextSpan.FromBounds(RightBeforeStart(LongSpan), RightBeforeEnd(LongSpan))));
75LongSpan.Subtract(TextSpan.FromBounds(RightBeforeStart(LongSpan), AtEnd(LongSpan))));
82LongSpan.Subtract(TextSpan.FromBounds(RightBeforeStart(LongSpan), RightAfterEnd(LongSpan))));
90LongSpan.Subtract(TextSpan.FromBounds(AtStart(LongSpan), AtStart(LongSpan))));
97[TextSpan.FromBounds(RightAfterStart(LongSpan), AtEnd(LongSpan))],
98LongSpan.Subtract(TextSpan.FromBounds(AtStart(LongSpan), RightAfterStart(LongSpan))));
105[TextSpan.FromBounds(RightBeforeEnd(LongSpan), AtEnd(LongSpan))],
106LongSpan.Subtract(TextSpan.FromBounds(AtStart(LongSpan), RightBeforeEnd(LongSpan))));
113LongSpan.Subtract(TextSpan.FromBounds(AtStart(LongSpan), AtEnd(LongSpan))));
120LongSpan.Subtract(TextSpan.FromBounds(AtStart(LongSpan), RightAfterEnd(LongSpan))));
128LongSpan.Subtract(TextSpan.FromBounds(RightAfterStart(LongSpan), RightAfterStart(LongSpan))));
136TextSpan.FromBounds(AtStart(LongSpan), RightAfterStart(LongSpan)),
137TextSpan.FromBounds(RightBeforeEnd(LongSpan), AtEnd(LongSpan))
139LongSpan.Subtract(TextSpan.FromBounds(RightAfterStart(LongSpan), RightBeforeEnd(LongSpan))));
146[TextSpan.FromBounds(AtStart(LongSpan), RightAfterStart(LongSpan))],
147LongSpan.Subtract(TextSpan.FromBounds(RightAfterStart(LongSpan), AtEnd(LongSpan))));
154[TextSpan.FromBounds(AtStart(LongSpan), RightAfterStart(LongSpan))],
155LongSpan.Subtract(TextSpan.FromBounds(RightAfterStart(LongSpan), RightAfterEnd(LongSpan))));
163LongSpan.Subtract(TextSpan.FromBounds(RightBeforeEnd(LongSpan), RightBeforeEnd(LongSpan))));
170[TextSpan.FromBounds(AtStart(LongSpan), RightBeforeEnd(LongSpan))],
171LongSpan.Subtract(TextSpan.FromBounds(RightBeforeEnd(LongSpan), AtEnd(LongSpan))));
178[TextSpan.FromBounds(AtStart(LongSpan), RightBeforeEnd(LongSpan))],
179LongSpan.Subtract(TextSpan.FromBounds(RightBeforeEnd(LongSpan), RightAfterEnd(LongSpan))));
187LongSpan.Subtract(TextSpan.FromBounds(AtEnd(LongSpan), AtEnd(LongSpan))));
195LongSpan.Subtract(TextSpan.FromBounds(AtEnd(LongSpan), RightAfterEnd(LongSpan))));
203LongSpan.Subtract(TextSpan.FromBounds(RightAfterEnd(LongSpan), RightAfterEnd(LongSpan))));
211UnitSpan.Subtract(TextSpan.FromBounds(RightBeforeStart(UnitSpan), RightBeforeStart(UnitSpan))));
219UnitSpan.Subtract(TextSpan.FromBounds(RightBeforeStart(UnitSpan), AtStart(UnitSpan))));
226UnitSpan.Subtract(TextSpan.FromBounds(RightBeforeStart(UnitSpan), AtEnd(UnitSpan))));
233UnitSpan.Subtract(TextSpan.FromBounds(RightBeforeStart(UnitSpan), RightAfterEnd(UnitSpan))));
241UnitSpan.Subtract(TextSpan.FromBounds(AtStart(UnitSpan), AtStart(UnitSpan))));
248UnitSpan.Subtract(TextSpan.FromBounds(AtStart(UnitSpan), AtEnd(UnitSpan))));
255UnitSpan.Subtract(TextSpan.FromBounds(AtStart(UnitSpan), RightAfterEnd(UnitSpan))));
263UnitSpan.Subtract(TextSpan.FromBounds(AtEnd(UnitSpan), AtEnd(UnitSpan))));
271UnitSpan.Subtract(TextSpan.FromBounds(AtEnd(UnitSpan), RightAfterEnd(UnitSpan))));
279UnitSpan.Subtract(TextSpan.FromBounds(RightAfterEnd(UnitSpan), RightAfterEnd(UnitSpan))));
287EmptySpan.Subtract(TextSpan.FromBounds(RightBeforeStart(EmptySpan), RightBeforeStart(EmptySpan))));
294EmptySpan.Subtract(TextSpan.FromBounds(RightBeforeStart(EmptySpan), EmptySpan.Start)));
301EmptySpan.Subtract(TextSpan.FromBounds(RightBeforeStart(EmptySpan), RightAfterEnd(EmptySpan))));
308EmptySpan.Subtract(TextSpan.FromBounds(EmptySpan.Start, EmptySpan.Start)));
315EmptySpan.Subtract(TextSpan.FromBounds(EmptySpan.Start, RightAfterEnd(EmptySpan))));
323EmptySpan.Subtract(TextSpan.FromBounds(RightAfterEnd(EmptySpan), RightAfterEnd(EmptySpan))));
Microsoft.VisualStudio.LanguageServices (18)
Venus\ContainedDocument.cs (10)
454groups.Add(TextSpan.FromBounds(0, 0));
458groups.Add(TextSpan.FromBounds(start, i));
462groups.Add(TextSpan.FromBounds(start, i));
475groups.Add(TextSpan.FromBounds(start, text.Length));
548TextSpan.FromBounds(visibleFirstLineInOriginalText.EndIncludingLineBreak, visibleLastLineInOriginalText.Start),
569TextSpan.FromBounds(visibleFirstLineInOriginalText.EndIncludingLineBreak, spanInOriginalText.End),
586TextSpan.FromBounds(spanInOriginalText.Start, visibleLastLineInOriginalText.Start),
841return new BaseIndentationFormattingRule(root, TextSpan.FromBounds(visibleSpan.Start, end), baseIndentation, _vbHelperFormattingRule);
851return new BaseIndentationFormattingRule(root, TextSpan.FromBounds(visibleSpan.Start, end), baseIndentation, _vbHelperFormattingRule);
946return (start <= end) ? TextSpan.FromBounds(start, end + 1) : default;
Microsoft.VisualStudio.LanguageServices.CSharp (5)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
Microsoft.VisualStudio.LanguageServices.VisualBasic (4)
Roslyn.VisualStudio.Next.UnitTests (3)