Files
codeql/csharp/ql/test/library-tests/properties/Properties1.ql
2018-08-02 17:53:23 +01:00

17 lines
372 B
Plaintext

/**
* @name Test for properties
*/
import csharp
from Property p, Field f
where p.hasName("Caption")
and p.isReadWrite()
and p.isPublic()
and f.isPrivate()
and f.getType() instanceof StringType
and p.getType() = f.getType()
and p.getDeclaringType() = f.getDeclaringType()
and p.getGetter().getStatementBody().getStmt(0) instanceof ReturnStmt
select p, f