10 overrides of TryGetFirstLocation
Microsoft.CodeAnalysis.CSharp (10)
Symbols\RangeVariableSymbol.cs (1)
51public override Location? TryGetFirstLocation()
Symbols\Source\LocalFunctionSymbol.cs (1)
338public override Location TryGetFirstLocation() => Syntax.Identifier.GetLocation();
Symbols\Source\SourceEventSymbol.cs (1)
122public override Location TryGetFirstLocation()
Symbols\Source\SourceFieldSymbol.cs (1)
216public override Location TryGetFirstLocation()
Symbols\Source\SourceLocalSymbol.cs (1)
406public override Location TryGetFirstLocation()
Symbols\Source\SourceMemberContainerSymbol.cs (1)
991public override Location TryGetFirstLocation()
Symbols\Source\SourceMemberMethodSymbol.cs (1)
779public override Location TryGetFirstLocation()
Symbols\Source\SourceNamespaceSymbol.cs (1)
104public override Location? TryGetFirstLocation()
Symbols\Source\SourceParameterSymbol.cs (1)
269public override Location? TryGetFirstLocation()
Symbols\Source\SourcePropertySymbolBase.cs (1)
524public sealed override Location TryGetFirstLocation() => Location;
23 references to TryGetFirstLocation
Microsoft.CodeAnalysis.CSharp (23)
Binder\Binder_Conversions.cs (1)
2393lambdaParameter.TryGetFirstLocation() ?? lambdaSymbol.SyntaxNode.Location);
Binder\Binder_NameConflicts.cs (1)
25=> symbol.TryGetFirstLocation() ?? symbol.ContainingSymbol.GetFirstLocation();
Compilation\SyntaxTreeSemanticModel.cs (1)
2388if (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)
642var exitLocation = method is SynthesizedPrimaryConstructor || method.DeclaringSyntaxReferences.IsEmpty ? null : method.TryGetFirstLocation();
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
575if (p.RefKind != RefKind.None && p.TryGetFirstLocation() is Location location)
Symbols\AliasSymbol.cs (3)
258Equals(this.TryGetFirstLocation(), other.TryGetFirstLocation()) && 263=> this.TryGetFirstLocation()?.GetHashCode() ?? Name.GetHashCode();
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
76tupleErrorField.TryGetFirstLocation(),
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
695Location symbolLocation = symbol.TryGetFirstLocation(); 1205Location symbolLocation = overridingSymbol.TryGetFirstLocation();
Symbols\Source\SourceMethodSymbol.cs (1)
80=> parameter.TryGetFirstLocation() ?? location;
Symbols\Source\SourceNamedTypeSymbol.cs (5)
1820Binder.GetWellKnownTypeMember(DeclaringCompilation, WellKnownMember.System_Reflection_DefaultMemberAttribute__ctor, diagnostics, indexerSymbol.TryGetFirstLocation() ?? GetFirstLocation()); 1836diagnostics.Add(ErrorCode.ERR_InlineArrayUnsupportedElementFieldModifier, elementField.TryGetFirstLocation() ?? GetFirstLocation()); 1850diagnostics.Add(ErrorCode.WRN_InlineArrayIndexerNotUsed, indexer.TryGetFirstLocation() ?? GetFirstLocation()); 1858diagnostics.Add(ErrorCode.WRN_InlineArraySliceNotUsed, slice.TryGetFirstLocation() ?? GetFirstLocation()); 1890diagnostics.Add(ErrorCode.WRN_InlineArrayNotSupportedByLanguage, elementField.TryGetFirstLocation() ?? GetFirstLocation());
Symbols\Source\SourcePropertySymbol.cs (1)
665diagnostics.Add(ErrorCode.ERR_DuplicateGeneratedName, param.TryGetFirstLocation() ?? Location, param.Name);
Symbols\Symbol.cs (3)
403var 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;