10 overrides of TryGetFirstLocation
Microsoft.CodeAnalysis.CSharp (10)
Symbols\RangeVariableSymbol.cs (1)
51
public override Location?
TryGetFirstLocation
()
Symbols\Source\LocalFunctionSymbol.cs (1)
344
public override Location
TryGetFirstLocation
() => Syntax.Identifier.GetLocation();
Symbols\Source\SourceEventSymbol.cs (1)
122
public override Location
TryGetFirstLocation
()
Symbols\Source\SourceFieldSymbol.cs (1)
216
public override Location
TryGetFirstLocation
()
Symbols\Source\SourceLocalSymbol.cs (1)
406
public override Location
TryGetFirstLocation
()
Symbols\Source\SourceMemberContainerSymbol.cs (1)
991
public override Location
TryGetFirstLocation
()
Symbols\Source\SourceMemberMethodSymbol.cs (1)
779
public override Location
TryGetFirstLocation
()
Symbols\Source\SourceNamespaceSymbol.cs (1)
104
public override Location?
TryGetFirstLocation
()
Symbols\Source\SourceParameterSymbol.cs (1)
269
public override Location?
TryGetFirstLocation
()
Symbols\Source\SourcePropertySymbolBase.cs (1)
524
public sealed override Location
TryGetFirstLocation
() => Location;
23 references to TryGetFirstLocation
Microsoft.CodeAnalysis.CSharp (23)
Binder\Binder_Conversions.cs (1)
2393
lambdaParameter.
TryGetFirstLocation
() ?? lambdaSymbol.SyntaxNode.Location);
Binder\Binder_NameConflicts.cs (1)
25
=> symbol.
TryGetFirstLocation
() ?? symbol.ContainingSymbol.GetFirstLocation();
Compilation\SyntaxTreeSemanticModel.cs (1)
2388
if (symbol.
TryGetFirstLocation
() is not Location location)
FlowAnalysis\DefiniteAssignment.cs (1)
1217
(symbol.
TryGetFirstLocation
() is var location && (location is null || node.Span.End < location.SourceSpan.Start)))
FlowAnalysis\NullableWalker.cs (1)
643
var exitLocation = method is SynthesizedPrimaryConstructor || method.DeclaringSyntaxReferences.IsEmpty ? null : method.
TryGetFirstLocation
();
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
575
if (p.RefKind != RefKind.None && p.
TryGetFirstLocation
() is Location location)
Symbols\AliasSymbol.cs (3)
258
Equals(this.
TryGetFirstLocation
(), other.
TryGetFirstLocation
()) &&
263
=> this.
TryGetFirstLocation
()?.GetHashCode() ?? Name.GetHashCode();
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
76
tupleErrorField.
TryGetFirstLocation
(),
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
695
Location symbolLocation = symbol.
TryGetFirstLocation
();
1205
Location symbolLocation = overridingSymbol.
TryGetFirstLocation
();
Symbols\Source\SourceMethodSymbol.cs (1)
80
=> parameter.
TryGetFirstLocation
() ?? location;
Symbols\Source\SourceNamedTypeSymbol.cs (5)
1851
Binder.GetWellKnownTypeMember(DeclaringCompilation, WellKnownMember.System_Reflection_DefaultMemberAttribute__ctor, diagnostics, indexerSymbol.
TryGetFirstLocation
() ?? GetFirstLocation());
1867
diagnostics.Add(ErrorCode.ERR_InlineArrayUnsupportedElementFieldModifier, elementField.
TryGetFirstLocation
() ?? GetFirstLocation());
1881
diagnostics.Add(ErrorCode.WRN_InlineArrayIndexerNotUsed, indexer.
TryGetFirstLocation
() ?? GetFirstLocation());
1889
diagnostics.Add(ErrorCode.WRN_InlineArraySliceNotUsed, slice.
TryGetFirstLocation
() ?? GetFirstLocation());
1921
diagnostics.Add(ErrorCode.WRN_InlineArrayNotSupportedByLanguage, elementField.
TryGetFirstLocation
() ?? GetFirstLocation());
Symbols\Source\SourcePropertySymbol.cs (1)
665
diagnostics.Add(ErrorCode.ERR_DuplicateGeneratedName, param.
TryGetFirstLocation
() ?? Location, param.Name);
Symbols\Symbol.cs (3)
403
var firstLocation = this.
TryGetFirstLocation
();
429
=>
TryGetFirstLocation
() ?? throw new InvalidOperationException("Symbol has no locations");
432
=>
TryGetFirstLocation
() ?? Location.None;
Symbols\Synthesized\Records\SynthesizedPrimaryConstructorParameterBackingFieldSymbol.cs (1)
36
=> ParameterSymbol.
TryGetFirstLocation
() ?? NoLocation.Singleton;