C#: Streamline the partial implementation for properties and events.

This commit is contained in:
Michael Nebel
2026-02-20 16:32:54 +01:00
parent 03a54bfbf9
commit 003b539287
5 changed files with 17 additions and 21 deletions

View File

@@ -731,6 +731,12 @@ namespace Semmle.Extraction.CSharp
public static IMethodSymbol GetBodyDeclaringSymbol(this IMethodSymbol method) =>
method.PartialImplementationPart ?? method;
public static IPropertySymbol GetBodyDeclaringSymbol(this IPropertySymbol property) =>
property.PartialImplementationPart ?? property;
public static IEventSymbol GetBodyDeclaringSymbol(this IEventSymbol symbol) =>
symbol.PartialImplementationPart ?? symbol;
[return: NotNullIfNotNull(nameof(symbol))]
public static IEntity? CreateEntity(this Context cx, ISymbol symbol)
{