Skip to content

Commit 8a4754f

Browse files
committed
C#: Add missing QlDoc for frameworks
1 parent 4be15af commit 8a4754f

File tree

9 files changed

+26
-0
lines changed

9 files changed

+26
-0
lines changed

csharp/ql/src/semmle/code/csharp/frameworks/EntityFramework.qll

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ private import semmle.code.csharp.frameworks.system.collections.Generic
88
private import semmle.code.csharp.frameworks.Sql
99
private import semmle.code.csharp.dataflow.LibraryTypeDataFlow
1010

11+
/** Definitions relating to the `System.ComponentModel.DataAnnotations`. */
1112
module DataAnnotations {
13+
/** Class for `NotMappedAttribute`. */
1214
class NotMappedAttribute extends Attribute {
1315
NotMappedAttribute() {
1416
this
@@ -18,6 +20,10 @@ module DataAnnotations {
1820
}
1921
}
2022

23+
/**
24+
* Definitions relating to the `Microsoft.EntityFrameworkCore` or
25+
* `System.Data.Entity`.
26+
*/
2127
module EntityFramework {
2228
/** An EF6 or EFCore namespace. */
2329
class EFNamespace extends Namespace {
@@ -43,12 +49,14 @@ module EntityFramework {
4349
class DbContext extends EFClass {
4450
DbContext() { this.getName() = "DbContext" }
4551

52+
/** Gets a `Find` or `FindAsync` method in the `DbContext`. */
4653
Method getAFindMethod() {
4754
result = this.getAMethod("Find")
4855
or
4956
result = this.getAMethod("FindAsync")
5057
}
5158

59+
/** Gets an `Update` method in the `DbContext`. */
5260
Method getAnUpdateMethod() { result = this.getAMethod("Update") }
5361
}
5462

@@ -119,6 +127,7 @@ module EntityFramework {
119127
preservesValue = false
120128
}
121129

130+
/** Gets a conversion operator from `string` to `RawSqlString`. */
122131
ConversionOperator getAConversionTo() {
123132
result = this.getAMember() and
124133
result.getTargetType() instanceof RawSqlStringStruct and

csharp/ql/src/semmle/code/csharp/frameworks/JsonNET.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,10 @@ module JsonNET {
135135
class JsonSerializerClass extends JsonClass, LibraryTypeDataFlow {
136136
JsonSerializerClass() { this.hasName("JsonSerializer") }
137137

138+
/** Gets the method for `JsonSerializer.Serialize`. */
138139
Method getSerializeMethod() { result = this.getAMethod("Serialize") }
139140

141+
/** Gets the method for `JsonSerializer.Deserialize`. */
140142
Method getDeserializeMethod() { result = this.getAMethod("Deserialize") }
141143

142144
override predicate callableFlow(

csharp/ql/src/semmle/code/csharp/frameworks/NHibernate.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
/**
2+
* Classes for modelling NHibernate.
3+
*/
4+
15
import csharp
26
private import semmle.code.csharp.frameworks.System
37
private import semmle.code.csharp.frameworks.system.Collections
48
private import semmle.code.csharp.frameworks.Sql
59

10+
/** Definitions relating to the `NHibernate` package. */
611
module NHibernate {
712
/** A class that is mapped to the database. */
813
abstract class MappedClass extends Class { }

csharp/ql/src/semmle/code/csharp/frameworks/system/Linq.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
private import csharp as csharp
66
private import semmle.code.csharp.frameworks.System as System
77

8+
/** Definitions relating to the `System.Linq`. */
89
module SystemLinq {
910
/** The `System.Linq` namespace. */
1011
class Namespace extends csharp::Namespace {

csharp/ql/src/semmle/code/csharp/frameworks/system/data/Common.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
private import csharp as csharp
66
private import semmle.code.csharp.frameworks.system.Data as Data
77

8+
/** Definitions relating to the `System.Data.Common`. */
89
module SystemDataCommon {
910
/** The `System.Data.Common` namespace. */
1011
class Namespace extends csharp::Namespace {

csharp/ql/src/semmle/code/csharp/frameworks/system/data/Entity.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
private import csharp as csharp
66
private import semmle.code.csharp.frameworks.system.Data as Data
77

8+
/** Definitions relating to the `System.Data.Entity`. */
89
module SystemDataEntity {
910
/** The `System.Data.Entity` namespace. */
1011
class Namespace extends csharp::Namespace {
@@ -78,6 +79,7 @@ module SystemDataEntity {
7879
}
7980
}
8081

82+
/** Definitions relating to the `System.Data.Entity.Infrastructure`. */
8183
module SystemDataEntityInfrastructure {
8284
/** The `System.Data.Entity.Infrastructure` namespace. */
8385
class Namespace extends csharp::Namespace {

csharp/ql/src/semmle/code/csharp/frameworks/system/linq/Expressions.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
private import csharp as csharp
66
private import semmle.code.csharp.frameworks.system.Linq
77

8+
/** Definitions relating to the `System.Linq.Expressions`. */
89
module SystemLinqExpressions {
910
/** The `System.Linq.Expressions` namespace. */
1011
class Namespace extends csharp::Namespace {

csharp/ql/src/semmle/code/csharp/frameworks/system/text/RegularExpressions.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* Provides classes related to the namespace `System.Text.RegularExpressions`.
3+
*/
4+
15
import default
26
import semmle.code.csharp.frameworks.system.Text
37

csharp/ql/src/semmle/code/csharp/frameworks/system/xml/XPath.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import csharp as csharp
44
private import semmle.code.csharp.frameworks.system.Xml as xml
55

6+
/** Definitions relating to the `System.Xml.XPath`. */
67
module SystemXmlXPath {
78
/** The `System.Xml.XPath` namespace. */
89
class Namespace extends csharp::Namespace {

0 commit comments

Comments
 (0)