10 overrides of TryGetFirstLocation
Microsoft.CodeAnalysis.CSharp (10)
Symbols\RangeVariableSymbol.cs (1)
51
public override Location?
TryGetFirstLocation
()
Symbols\Source\LocalFunctionSymbol.cs (1)
338
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)
642
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)
1820
Binder.GetWellKnownTypeMember(DeclaringCompilation, WellKnownMember.System_Reflection_DefaultMemberAttribute__ctor, diagnostics, indexerSymbol.
TryGetFirstLocation
() ?? GetFirstLocation());
1836
diagnostics.Add(ErrorCode.ERR_InlineArrayUnsupportedElementFieldModifier, elementField.
TryGetFirstLocation
() ?? GetFirstLocation());
1850
diagnostics.Add(ErrorCode.WRN_InlineArrayIndexerNotUsed, indexer.
TryGetFirstLocation
() ?? GetFirstLocation());
1858
diagnostics.Add(ErrorCode.WRN_InlineArraySliceNotUsed, slice.
TryGetFirstLocation
() ?? GetFirstLocation());
1890
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)
34
=> ParameterSymbol.
TryGetFirstLocation
() ?? NoLocation.Singleton;