88 references to Create
Microsoft.AspNetCore.App.Analyzers (3)
RouteEmbeddedLanguage\RoutePatternAnalyzer.cs (2)
62Location.Create(context.SemanticModel.SyntaxTree, diag.Span), 105Location.Create(context.SemanticModel.SyntaxTree, unusedParameter.Span),
WebApplicationBuilder\WebApplicationBuilderAnalyzer.cs (1)
301location = Location.Create(operation.Syntax.SyntaxTree, targetSpan);
Microsoft.CodeAnalysis.CodeStyle (7)
src\Analyzers\Core\Analyzers\FileHeaders\FileHeader.cs (2)
102return Location.Create(syntaxTree, new TextSpan(_fileHeaderStart, 0)); 105return Location.Create(syntaxTree, new TextSpan(_fileHeaderStart, _commentPrefixLength));
src\Analyzers\Core\Analyzers\Formatting\AbstractFormattingAnalyzer.cs (1)
97var location = Location.Create(tree, change.Span);
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (1)
79Location.Create(badTrivia.SyntaxTree!, new TextSpan(badTrivia.SpanStart, 0)),
src\Analyzers\Core\Analyzers\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (1)
135return Location.Create(parenthesizedExpression.SyntaxTree, TextSpan.FromBounds(parenthesizedExpressionLocation.SourceSpan.Start, textSpanEndPosition));
src\Analyzers\Core\Analyzers\UseObjectInitializer\AbstractUseObjectInitializerDiagnosticAnalyzer.cs (1)
151var location1 = Location.Create(syntaxTree, TextSpan.FromBounds(
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
352var invalidPlaceholderLocation = Location.Create(
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\OrderModifiers\AbstractOrderModifiersCodeFixProvider.cs (1)
44var syntaxNode = Location.Create(syntaxTree, context.Span).FindNode(context.CancellationToken);
Microsoft.CodeAnalysis.CSharp.CodeStyle (10)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
70return Location.Create(
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (7)
133Location.Create(tree, ifStatement.Span), 134Location.Create(tree, expressionStatement.Span)); 182var fadeLocation = Location.Create(tree, TextSpan.FromBounds(firstStatement.SpanStart, previousToken.Span.End)); 203fadeLocation = Location.Create(tree, TextSpan.FromBounds(nextToken.Span.Start, ifStatement.Span.End)); 321Location.Create(tree, localDeclarationStatement.Span), 322Location.Create(tree, ifStatement.Span), 323Location.Create(tree, expressionStatement.Span));
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (1)
104=> Location.Create(declaration.SyntaxTree,
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
125var location = Location.Create(syntaxNode.SyntaxTree, span);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (1)
355=> context.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.Create(context.Tree, TextSpan.FromBounds(1000, 2000))));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (6)
CodeGen\CodeGenTupleTest.cs (6)
5799var loc1 = Location.Create(tree, new TextSpan(0, 1)); 5910var loc1 = Location.Create(tree, new TextSpan(0, 1)); 5911var loc2 = Location.Create(tree, new TextSpan(1, 1)); 6351var loc1 = Location.Create(syntaxTree, new TextSpan(0, 1)); 6387var loc1 = Location.Create(syntaxTree, new TextSpan(0, 1)); 6388var loc2 = Location.Create(syntaxTree, new TextSpan(1, 1));
Microsoft.CodeAnalysis.CSharp.Features (10)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
70return Location.Create(
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (7)
133Location.Create(tree, ifStatement.Span), 134Location.Create(tree, expressionStatement.Span)); 182var fadeLocation = Location.Create(tree, TextSpan.FromBounds(firstStatement.SpanStart, previousToken.Span.End)); 203fadeLocation = Location.Create(tree, TextSpan.FromBounds(nextToken.Span.Start, ifStatement.Span.End)); 321Location.Create(tree, localDeclarationStatement.Span), 322Location.Create(tree, ifStatement.Span), 323Location.Create(tree, expressionStatement.Span));
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (1)
104=> Location.Create(declaration.SyntaxTree,
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
125var location = Location.Create(syntaxNode.SyntaxTree, span);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (16)
SourceGeneration\GeneratorDriverTests.cs (16)
1271c.ReportDiagnostic(d.WithLocation(Location.Create(c.Compilation.SyntaxTrees.First(), l))); 1360return x.Diagnostic.WithLocation(Location.Create(syntaxTree, TextSpan.FromBounds(start, end))); 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 (2)
Compilation\CompilationAPITests.cs (2)
2622var loc1 = Location.Create(tree, new TextSpan(0, 1)); 2623var loc2 = Location.Create(tree, new TextSpan(1, 1));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Syntax\SyntaxFactoryTests.cs (2)
452var expectedLocation = Location.Create(expression.Token.SyntaxTree, TextSpan.FromBounds(0, 2)); 466var expectedLocation = Location.Create(expression.Token.SyntaxTree, TextSpan.FromBounds(0, 2));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (1)
858var generator = new DiagnosticProducingGenerator(c => Location.Create(c.Compilation.SyntaxTrees.Single(), new TextSpan(0, 10)));
Microsoft.CodeAnalysis.Features (11)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaBatchFixHelpers.cs (1)
70var currentLocation = Location.Create(currentTree, currentDiagnosticSpan);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Pragma.cs (1)
211var locationToCheck = Location.Create(tree, spanToCheck);
NavigationBar\AbstractNavigationBarItemService.cs (1)
80Location.Create(allReferences.First().SyntaxTree, allReferences.First().Span);
src\Analyzers\Core\Analyzers\FileHeaders\FileHeader.cs (2)
102return Location.Create(syntaxTree, new TextSpan(_fileHeaderStart, 0)); 105return Location.Create(syntaxTree, new TextSpan(_fileHeaderStart, _commentPrefixLength));
src\Analyzers\Core\Analyzers\Formatting\AbstractFormattingAnalyzer.cs (1)
97var location = Location.Create(tree, change.Span);
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (1)
79Location.Create(badTrivia.SyntaxTree!, new TextSpan(badTrivia.SpanStart, 0)),
src\Analyzers\Core\Analyzers\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (1)
135return Location.Create(parenthesizedExpression.SyntaxTree, TextSpan.FromBounds(parenthesizedExpressionLocation.SourceSpan.Start, textSpanEndPosition));
src\Analyzers\Core\Analyzers\UseObjectInitializer\AbstractUseObjectInitializerDiagnosticAnalyzer.cs (1)
151var location1 = Location.Create(syntaxTree, TextSpan.FromBounds(
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
352var invalidPlaceholderLocation = Location.Create(
ValueTracking\ValueTracker.cs (1)
48var location = Location.Create(syntaxRef.SyntaxTree, syntaxRef.Span);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Diagnostics\PullDiagnosticTests.cs (3)
678var generator = new DiagnosticProducingGenerator(context => Location.Create(context.Compilation.SyntaxTrees.Single(), new TextSpan(0, 10))); 1324var generator = new DiagnosticProducingGenerator(context => Location.Create(context.Compilation.SyntaxTrees.Single(), new TextSpan(0, 10))); 1344context => Location.Create(
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
904c.ReportDiagnostic(Diagnostic.Create(Descriptor, SourceLocation.Create(c.Tree, _badSpan)));
Microsoft.CodeAnalysis.VisualBasic (2)
Binding\Binder_Query.vb (2)
4664diagnosticLocationOpt:=Location.Create(node.SyntaxTree, operatorNameLocation)) 4716ReportDiagnostic(diagnostics, Location.Create(node.SyntaxTree, operatorNameLocation), ERRID.ERR_QueryOperatorNotFound, operatorName)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (5)
CodeGen\CodeGenTuples.vb (5)
6872Dim loc1 = Location.Create(tree, New TextSpan(0, 1)) 6921Dim loc1 = Location.Create(tree, New TextSpan(0, 1)) 6922Dim loc2 = Location.Create(tree, New TextSpan(1, 1)) 7270Dim loc1 = Location.Create(tree, New TextSpan(0, 1)) 7271Dim loc2 = Location.Create(tree, New TextSpan(1, 1))
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (6)
Compilation\CompilationAPITests.vb (2)
1603Dim loc1 = Location.Create(tree, New TextSpan(0, 1)) 1604Dim loc2 = Location.Create(tree, New TextSpan(1, 1))
SourceGeneration\GeneratorDriverTests.vb (4)
312location:=Location.Create(syntaxTree, TextSpan.FromBounds(2, 4)))) 344additionalLocations:={Location.Create(invalidSyntaxTree, TextSpan.FromBounds(2, 4))})) 374location:=Location.Create(syntaxTree, TextSpan.FromBounds(2, 4)))) 405additionalLocations:={Location.Create(invalidSyntaxTree, TextSpan.FromBounds(2, 4))}))
Microsoft.CodeAnalysis.Workspaces (1)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder_GlobalSuppressions.cs (1)
232var location = Location.Create(root.SyntaxTree, new TextSpan(positionOfReferenceInTree, length));