100 references to Create
Microsoft.CodeAnalysis.CodeStyle (8)
AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (1)
78Location.Create(badTrivia.SyntaxTree!, new TextSpan(badTrivia.SpanStart, 0)),
AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (1)
136return Location.Create(parenthesizedExpression.SyntaxTree, TextSpan.FromBounds(parenthesizedExpressionLocation.SourceSpan.Start, textSpanEndPosition));
AbstractUseObjectInitializerDiagnosticAnalyzer.cs (1)
135var location1 = Location.Create(syntaxTree, TextSpan.FromBounds(
AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
352var invalidPlaceholderLocation = Location.Create(
FileHeader.cs (2)
102return Location.Create(syntaxTree, new TextSpan(_fileHeaderStart, 0)); 105return Location.Create(syntaxTree, new TextSpan(_fileHeaderStart, _commentPrefixLength));
FormattingAnalyzerHelper.cs (1)
65var location = Location.Create(tree, change.Span);
SymbolKey.SymbolKeyReader.cs (1)
696return Location.Create(syntaxTree, new TextSpan(start, length));
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
AbstractOrderModifiersCodeFixProvider.cs (1)
44var syntaxNode = Location.Create(syntaxTree, context.Span).FindNode(context.CancellationToken);
Microsoft.CodeAnalysis.CSharp (6)
Binder\Binder_Expressions.cs (2)
6230diagnostics.Add(new CSDiagnosticInfo(ErrorCode.WRN_LowercaseEllSuffix), Location.Create(node.SyntaxTree, new TextSpan(token.Span.End - 1, 1))); 6234diagnostics.Add(new CSDiagnosticInfo(ErrorCode.WRN_LowercaseEllSuffix), Location.Create(node.SyntaxTree, new TextSpan(token.Span.End - 2, 1)));
Binder\Binder_Statements.cs (2)
3303return Location.Create(lambdaSyntax.SyntaxTree, 3307return Location.Create(anonymousMethodSyntax.SyntaxTree,
Binder\Binder_Symbols.cs (1)
454diagnostics.Add(info, Location.Create(@delegate.SyntaxTree, TextSpan.FromBounds(@delegate.SpanStart, asterisk.Span.End)));
FlowAnalysis\NullableWalker.cs (1)
7828location = Location.Create(lambdaSyntax.SyntaxTree, new Text.TextSpan(start, lambdaSyntax.ArrowToken.Span.End - start));
Microsoft.CodeAnalysis.CSharp.CodeStyle (11)
ConvertProgramAnalysis_ProgramMain.cs (1)
75return Location.Create(
CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
258var location = Location.Create(invocation.SyntaxTree,
InvokeDelegateWithConditionalAccessAnalyzer.cs (7)
134Location.Create(tree, ifStatement.Span), 135Location.Create(tree, expressionStatement.Span)); 183var fadeLocation = Location.Create(tree, TextSpan.FromBounds(firstStatement.SpanStart, previousToken.Span.End)); 202fadeLocation = 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));
UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (1)
99=> Location.Create(declaration.SyntaxTree,
UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
125var location = Location.Create(syntaxNode.SyntaxTree, span);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (1)
356=> context.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.Create(context.Tree, TextSpan.FromBounds(1000, 2000))));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (6)
CodeGen\CodeGenTupleTest.cs (6)
5794var loc1 = Location.Create(tree, new TextSpan(0, 1)); 5905var loc1 = Location.Create(tree, new TextSpan(0, 1)); 5906var loc2 = Location.Create(tree, new TextSpan(1, 1)); 6346var loc1 = Location.Create(syntaxTree, new TextSpan(0, 1)); 6382var loc1 = Location.Create(syntaxTree, new TextSpan(0, 1)); 6383var loc2 = Location.Create(syntaxTree, new TextSpan(1, 1));
Microsoft.CodeAnalysis.CSharp.Features (11)
ConvertProgramAnalysis_ProgramMain.cs (1)
75return Location.Create(
CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
258var location = Location.Create(invocation.SyntaxTree,
InvokeDelegateWithConditionalAccessAnalyzer.cs (7)
134Location.Create(tree, ifStatement.Span), 135Location.Create(tree, expressionStatement.Span)); 183var fadeLocation = Location.Create(tree, TextSpan.FromBounds(firstStatement.SpanStart, previousToken.Span.End)); 202fadeLocation = 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));
UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (1)
99=> Location.Create(declaration.SyntaxTree,
UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
125var location = Location.Create(syntaxNode.SyntaxTree, span);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
SourceGeneration\GeneratorDriverTests.cs (2)
1271c.ReportDiagnostic(d.WithLocation(Location.Create(c.Compilation.SyntaxTrees.First(), l))); 1349return x.Diagnostic.WithLocation(Location.Create(syntaxTree, TextSpan.FromBounds(start, end)));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\CompilationAPITests.cs (2)
2623var loc1 = Location.Create(tree, new TextSpan(0, 1)); 2624var loc2 = Location.Create(tree, new TextSpan(1, 1));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Syntax\SyntaxFactoryTests.cs (2)
440var expectedLocation = Location.Create(expression.Token.SyntaxTree, TextSpan.FromBounds(0, 2)); 454var expectedLocation = Location.Create(expression.Token.SyntaxTree, TextSpan.FromBounds(0, 2));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (11)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (1)
1151var generator = new DiagnosticProducingGenerator(c => Location.Create(c.Compilation.SyntaxTrees.Single(), new TextSpan(0, 10)));
Diagnostics\DiagnosticsClassificationTaggerProviderTests.cs (4)
94var primaryLocation = Location.Create(c.Tree, new TextSpan(0, 10)); 105var additionalLocations = ImmutableArray.Create(Location.Create(c.Tree, new TextSpan(0, 10))); 107Location.Create(c.Tree, new TextSpan(0, 1)), 108Location.Create(c.Tree, new TextSpan(9, 1)));
Diagnostics\DiagnosticsSquiggleTaggerProviderTests.cs (3)
158diagnosticService.CreateDiagnosticAndFireEvents(workspace, analyzerService, Location.Create(tree, span), diagnosticKind); 197diagnosticService.CreateDiagnosticAndFireEvents(workspace, analyzerService, Location.Create(tree, span), diagnosticKind); 229c.ReportDiagnostic(Diagnostic.Create(_rule, Location.Create(c.Tree, new TextSpan(0, 1))));
EditAndContinue\RemoteEditAndContinueServiceTests.cs (3)
140var diagnostic = Diagnostic.Create(diagnosticDescriptor, Location.Create(syntaxTree, TextSpan.FromBounds(1, 1))); 220var documentDiagnostic = Diagnostic.Create(diagnosticDescriptor1, Location.Create(syntaxTree, TextSpan.FromBounds(1, 2)), new[] { "doc", "some error" }); 222var syntaxError = Diagnostic.Create(diagnosticDescriptor1, Location.Create(syntaxTree, TextSpan.FromBounds(1, 2)), new[] { "doc", "syntax error" });
Microsoft.CodeAnalysis.Features (16)
AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (1)
78Location.Create(badTrivia.SyntaxTree!, new TextSpan(badTrivia.SpanStart, 0)),
AbstractOrderModifiersCodeFixProvider.cs (1)
44var syntaxNode = Location.Create(syntaxTree, context.Span).FindNode(context.CancellationToken);
AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (1)
136return Location.Create(parenthesizedExpression.SyntaxTree, TextSpan.FromBounds(parenthesizedExpressionLocation.SourceSpan.Start, textSpanEndPosition));
AbstractUseObjectInitializerDiagnosticAnalyzer.cs (1)
135var location1 = Location.Create(syntaxTree, TextSpan.FromBounds(
AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
352var invalidPlaceholderLocation = Location.Create(
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaBatchFixHelpers.cs (1)
71var currentLocation = Location.Create(currentTree, currentDiagnosticSpan);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Pragma.cs (1)
211var locationToCheck = Location.Create(tree, spanToCheck);
EditAndContinue\EditSession.cs (1)
208yield return Location.Create(newTree, GetFirstLineDifferenceSpan(oldText, newText));
EmbeddedLanguages\Json\LanguageServices\AbstractJsonDiagnosticAnalyzer.cs (1)
82Location.Create(context.SemanticModel.SyntaxTree, diag.Span),
EmbeddedLanguages\RegularExpressions\LanguageServices\AbstractRegexDiagnosticAnalyzer.cs (1)
91Location.Create(context.SemanticModel.SyntaxTree, diag.Span),
FileHeader.cs (2)
102return Location.Create(syntaxTree, new TextSpan(_fileHeaderStart, 0)); 105return Location.Create(syntaxTree, new TextSpan(_fileHeaderStart, _commentPrefixLength));
FormattingAnalyzerHelper.cs (1)
65var location = Location.Create(tree, change.Span);
MetadataAsSource\MetadataAsSourceHelpers.cs (1)
75location = Location.Create(tree, new TextSpan(0, 0));
NavigationBar\AbstractNavigationBarItemService.cs (1)
80Location.Create(allReferences.First().SyntaxTree, allReferences.First().Span);
ValueTracking\ValueTracker.cs (1)
49var location = Location.Create(syntaxRef.SyntaxTree, syntaxRef.Span);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Diagnostics\PullDiagnosticTests.cs (3)
676var generator = new DiagnosticProducingGenerator(context => Location.Create(context.Compilation.SyntaxTrees.Single(), new TextSpan(0, 10))); 1003var generator = new DiagnosticProducingGenerator(context => Location.Create(context.Compilation.SyntaxTrees.Single(), new TextSpan(0, 10))); 1022context => Location.Create(
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
818c.ReportDiagnostic(Diagnostic.Create(Descriptor, SourceLocation.Create(c.Tree, _badSpan)));
Microsoft.CodeAnalysis.VisualBasic (6)
Binding\Binder_Query.vb (6)
1961ReportDiagnostic(diagnostics, Location.Create(groupBy.SyntaxTree, GetGroupByOperatorNameSpan(groupBy)), ERRID.ERR_QueryOperatorNotFound, StringConstants.GroupByMethod) 2000ReportDiagnostic(diagnostics, Location.Create(groupBy.SyntaxTree, GetGroupByOperatorNameSpan(groupBy)), ERRID.ERR_QueryOperatorNotFound, StringConstants.GroupByMethod) 2040Location.Create(groupJoin.SyntaxTree, GetQueryOperatorNameSpan(groupJoin.GroupKeyword, groupJoin.JoinKeyword)), 2076Location.Create(groupJoin.SyntaxTree, GetQueryOperatorNameSpan(groupJoin.GroupKeyword, groupJoin.JoinKeyword)), 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)
6873Dim loc1 = Location.Create(tree, New TextSpan(0, 1)) 6922Dim loc1 = Location.Create(tree, New TextSpan(0, 1)) 6923Dim loc2 = Location.Create(tree, New TextSpan(1, 1)) 7271Dim loc1 = Location.Create(tree, New TextSpan(0, 1)) 7272Dim loc2 = Location.Create(tree, New TextSpan(1, 1))
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (4)
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 (2)
379c.ReportDiagnostic(diag.WithLocation(CodeAnalysis.Location.Create(c.Compilation.SyntaxTrees.First(), location))) 407Return x.Diagnostic.WithLocation(Location.Create(syntaxTree, TextSpan.FromBounds(start, endpoint)))
Microsoft.CodeAnalysis.Workspaces (4)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder_GlobalSuppressions.cs (1)
233var location = Location.Create(root.SyntaxTree, new TextSpan(positionOfReferenceInTree, length));
Remote\RemoteArguments.cs (1)
199CodeAnalysis.Location.Create(syntaxTree, Location),
Rename\IRemoteRenamerService.cs (1)
132CodeAnalysis.Location.Create(tree, Location),
SymbolKey.SymbolKeyReader.cs (1)
696return Location.Create(syntaxTree, new TextSpan(start, length));