mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
C#: Streamline the partial implementation for properties and events.
This commit is contained in:
@@ -15,8 +15,8 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
protected CachedSymbol(Context cx, T init)
|
||||
: base(cx, init)
|
||||
{
|
||||
blockLazy = new Lazy<BlockSyntax?>(() => GetBlock(BodyDeclaringSymbol));
|
||||
expressionBodyLazy = new Lazy<ExpressionSyntax?>(() => GetExpressionBody(BodyDeclaringSymbol));
|
||||
blockLazy = new Lazy<BlockSyntax?>(() => GetBlock(Symbol));
|
||||
expressionBodyLazy = new Lazy<ExpressionSyntax?>(() => GetExpressionBody(Symbol));
|
||||
}
|
||||
|
||||
public virtual Type? ContainingType => Symbol.ContainingType is not null
|
||||
@@ -92,8 +92,6 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
Context.BindComments(this, FullLocation);
|
||||
}
|
||||
|
||||
protected virtual T BodyDeclaringSymbol => Symbol;
|
||||
|
||||
private static BlockSyntax? GetBlock(T symbol)
|
||||
{
|
||||
return symbol.DeclaringSyntaxReferences
|
||||
|
||||
Reference in New Issue
Block a user